Link to home
Start Free TrialLog in
Avatar of precision
precision

asked on

Simple PHP Question

Here is what I have:

an include directory with the following:
style.php
header.php
footer.php

inside index.php source is the following:

<?php include("style.php"); ?>

<?php include("header.php"); ?>

<?php include("footer.php"); ?>

Only one that works is header.php, style.php and footer.php are uploaded.  Error I get is:

Warning: main(footer.php): failed to open stream: No such file or directory in /xxx/about_more.php on line 81

Warning: main(footer.php): failed to open stream: No such file or directory in /xxx/about_more.php on line 81

Warning: main(): Failed opening 'footer.php' for inclusion (include_path='.:/usr/local/lib/php') in /xxx/about_more.php on line 81
ASKER CERTIFIED SOLUTION
Avatar of nicholassolutions
nicholassolutions
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of precision
precision

ASKER

I will try that but 1 out of the 3 work and they are all in the same locations with the same calls as above.
Bingo!  Don't ask me why, 1 worked and the 2 others did not as I had originally.  When I did what you recommended they all work with the full path.  Thanks!
glad to help ;)
That problem got me a bunch of times when I was starting out with PHP...and a couple times since ;)