Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Marcus 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