Link to root directory
Posted: Tue Oct 20, 2009 12:40 pm
Hi all,
Can anyone tell me a way of directly linking to the root directory (the public html folder) ?
I've tried $SERVER["DOCUMENT_ROOT"] but this gives the directory this code is in rather than the public html folder.
I want to use this in an included footer, which links to the index but on some pages it would need to be ../index.php and in others it would need to be ../../index.php etc etc so I need a way of linking to the route directory from which ever directory I am currently inside.
Hope I have explained that well enough.
Cheers
Steve
Can anyone tell me a way of directly linking to the root directory (the public html folder) ?
I've tried $SERVER["DOCUMENT_ROOT"] but this gives the directory this code is in rather than the public html folder.
I want to use this in an included footer, which links to the index but on some pages it would need to be ../index.php and in others it would need to be ../../index.php etc etc so I need a way of linking to the route directory from which ever directory I am currently inside.
Hope I have explained that well enough.
Cheers
Steve