include('includes/header.php');
for top directory
include('../includes/header.php');
for second level directory
Is that it?
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
There's a better way to do this, but a simple workaround would be:
include($_SERVER['DOCUMENT_ROOT'] . "/includes/header.php");
That'll work from anywhere in your code (most likely).
If it's for navigation, use absolutes:
<li><a href="/index.php">home</a></li>
<li><a href="/folder/newpage.php">page</a></li>
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
or if using multiple directory structures
<?php define('_path','../../');//example only it would be different for each folder
include(_path.'menu.php');?>
and each item in the menu file also references the path <a href='<?php echo _path; ?>/downto/thisfolder.htm'>thisfolder</a>
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376