PDA

View Full Version : Map structure


i1277
14.08.2001, 08:10
This is probably a peanut question for you, regarding the catalog structure of a web site. I simply don't know what the standard procedures are.
The problem is I've made categories to tidy up, but that means many different directories and trouble when referring to what's in other dirs, the images dir being the main example.
Do I need to refer to the whole url each time? This seems like extra work and trouble when changing server.

baby
14.08.2001, 10:23
Do you use any kind of server-side language?
Then i'll have a tip for you that i use:
create a variable that has the url as value.
Then just print out the variable to those places who need the full url, for ex images.
In most server-side language the url to pwd is easy to get, often by just using a varible.

Ex in php4:

<?php
$url="http://".$HTTP_HOST; //the full path to pwd
?>

<?php echo $url; ?>images/mygif.gif</img>

Hope that helps