Page 1 of 1

error with absolute path for include

Posted: Tue Mar 29, 2005 10:13 am
by bruceg
I'm getting an error when trying to preview this include. This is the absolute path to my include file, but I get an error 'failed to open stream, no such file or directory.'

Code: Select all

"<?php include ' c:\inetpub\wwwroot\SSI\footer.htm'; ?>"
could there be an error in the way I have PHP configured? I can post the results from

Code: Select all

<?php phpinfo() ?>
if that would help.

regards,

Posted: Tue Mar 29, 2005 10:16 am
by anjanesh
Dont include an absolute path - it'll not recognize it.

Code: Select all

include("SSI/footer.htm");
To not to include it more than once in a script :

Code: Select all

include_once("SSI/footer.htm");
If you are calling it from a script in SSI, remove SSI

Code: Select all

include_once("footer.htm");