directory path

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

directory path

Post by bkm_ho »

img src="systems/<?=ACTIVE_SITE?>/templates/<?=SITE_TEMPLATE?>/img/index_05.jpg

can someone tell me where the jpg file should go using the above path?

what does ACTIVE_SITE and SITE_TEMPLATE actually mean?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: directory path

Post by Benjamin »

<?= is short for "<?php echo " and the two items you're questioning are constants.
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: directory path

Post by bkm_ho »

thanks for your post devnet master, but i dont know anything about php.

is there anyway you can explain in laymen terms? much appreciated. thanks
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: directory path

Post by Benjamin »

echo means display

A constant is defined someplace else in the script. It can be set once and cannot be changed. The code that sets it would look like:

Code: Select all

define('ACTIVE_SITE', 'images')
So the browser would receive something like:

Code: Select all

 
img src="systems/images/templates/default_template/img/index_05.jpg
 
You can view the source of the page using your browser to get the actual values, or search the code for the define statements.
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: directory path

Post by bkm_ho »

you're a star! million thanks!
Post Reply