Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
Thread: Making links to document root
06-02-2007, 02:59 AM #1
Making links to document root
I would like to know if there is a way to make internal links to your document root. I know there is a way to do it with PHP includes, but not with links. Any help would be great. Thanks.
06-02-2007, 03:08 AM #2
- Join Date
- May 2005
- Thanked 0 Times in 0 Posts
Yeah, it's actually simpler than you would think. Just use ../ to go back one folder. (ie <a href="../things.html">Things</a>)
If you wanted to go to the root folder, than why not just use a absolute destination? I.E. if your site is www.internet.com, and you are in the stuff/things/ folder, link to "http://www.internet.com/index.html".
06-02-2007, 03:29 AM #3
06-02-2007, 03:55 AM #4
- Join Date
- Oct 2006
- Denver, Colorado USA
- Thanked 339 Times in 331 Posts
A leading / in a url refers to the document root - http://www.library.upenn.edu/sitedoc...s-rootrel.html
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.