|
Posted by Ringo on 07/18/05 18:20
"Ken LE PRADO" <ken@leprado.com> wrote in message
news:42db4d72$0$25045$8fcfb975@news.wanadoo.fr...
> 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
Hi,
Yea, it's a major problem, root relative urls, with php, cause you either
must have all includes and parents int he same folder, or you must have some
help scripts in some of the php documents. Too, many domains do not normally
recognise or allow root relative or /urls.
www
Navigation:
[Reply to this message]
|