declare an environment variable eg; $path
set it to an appropriate value wherever u need to read a script in different directory eg. if ur header file(header.inc) is in dir "root" and the current script is in dir "root/current", then set $path="../" in the current script and then include the header.inc
in header.inc prepend $path to every link in header eg: <a href=<? echo $path?>scriptname.php>go to script</a>
if $path contains a value it will be read else the script will read the current dir