|
Posted by Ken LE PRADO on 07/18/05 09:34
In all my websites, I have a config file with the base url path (ex :
$baseDir='http://toto.com/site' ) and a function makeUrl();
When I need to make an absolute link, I use my function
makeUrl('/dir1/file1.php') and it output http://toto.com/site/dir1/file1.php
This is used for example in the menus, or headers that are called in
every pages, but not in the pages that just include some files.
Why don't use just a link to '/dir1/file1.php' ? Just because it is the
dir for the root path, and you don't have allways access to a root path.
Ken
Navigation:
[Reply to this message]
|