Click to See Complete Forum and Search --> : include php file that include other php file


Anon
08-03-2000, 11:06 PM
I have a template file for header and footer php file at home folders.

Now I create a new page under home folder like guestbook folder. After I created my guess book. I want to include a template file in my guestbook.

in my guestbook.php
I use include ../../tempalate.php

but it give me error msg that it can't open header.php and footer.php under template.php file?

Why?? I think may be because php think that I'm at home folder. Php doesn't know that I'm atually at homr/guestbook/version1/
folder and it can't get the header/footer by
../../header.php and ../../footer.php

Is there an easy way to solve this?

Anon
08-04-2000, 10:32 AM
Have you tried using <?php require() together with $DOCUMENT_ROOT and/or $DOCUMENT_MUM ?

I seem to remember that require() has more extended capabilites than include() has, one of them being able to open other PHP files within a PHP file..