Forum Moderators: coopster
I know when doing includes, it's best to have it
<? inlcude$_SERVER['DOCUMENT_ROOT']. "/nav.htm?;>
What I can't seem to think through is what are the links relative to? Is it the location of the nav.htm page or the page.php page? In other words, there's no problem if the page.php is at the root level along with the nav.htm page, but if page.php is located at root/file/file/page.php and the include nav.htm is in the page, to which page are the links relative? Make sense?
Or is it simpler to just use absolute URL's?
include, it is as if second.php was cut and pasted into first.php.
But, you could also check with you server to find out if they have configurate an include_path - ini_get("include_path");
In such case, you can just create an include folder - most of the time called include(s) - in www root.
Then everytime you can an include - include_once(text1.php) - it will look in the include folder first. If not found, then it follows the rules described above.
Cheers