Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMarcus Burkhart
3,169 PointsPHP RECEIPT PAGE ERROR
For some reason these are the errors I am getting on my receipt/index.php page
Warning: include(../inc/header.php): failed to open stream: No such file or directory in C:\xampp1\htdocs\receipt\index.php on line 4
Warning: include(): Failed opening '../inc/header.php' for inclusion (include_path='.;C:\xampp1\php\PEAR') in C:\xampp1\htdocs\receipt\index.php on line 4
Then the middle THANK YOU! section works out perfectly fine..
Warning: include(../inc/footer.php): failed to open stream: No such file or directory in C:\xampp1\htdocs\receipt\index.php on line 20
Warning: include(): Failed opening '../inc/footer.php' for inclusion (include_path='.;C:\xampp1\php\PEAR') in C:\xampp1\htdocs\receipt\index.php on line 20
These used to be working fine then I don't understand where its going wrong.
1 Answer
Martin Adam
1,241 PointsHi,
have you already sorted it out?
So index.php is in "C:\xampp1\htdocs\receipt\" folder and header.php is in "C:\xampp1\htdocs\inc" folder? If not, remove ".." from path like this: - include("inc/header.php") - If path is correct, be sure you have doublequotes in place: include("../inc/header.php");
Cheers, Martin