Page 1 of 1

include() file path question

Posted: Sun Jul 08, 2007 9:35 pm
by me!
Hi all,

I have a question on how to include files in different dir.

I have a header and footer file that is in the root dir. along with 90% of my other content. When any of those pages call the header and footer no problem.... But when a page from a sub dir. calls the includes no go???

How do I call the include?


root/header.php
root/footer.php

root/any_dir/some_file.php = :(

root/some_file.php = :)

Posted: Sun Jul 08, 2007 9:37 pm
by s.dot
Could use an absolute or relative path.

include '/home/user/public_html/header.php';
include '../header.php';