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!

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 trial

PHP Build a Simple PHP Application Creating the Menu and Footer Including the Header

Gabriel Almanza
Gabriel Almanza
Courses Plus Student 8,078 Points

i didnt get the same result

when i refresh the page it appears me the next message: Warning: include(include/header.php): failed to open stream: No such file or directory in C:\xampp\htdocs\shirts4mike\index.php on line 1

3 Answers

I think you're missing your single quotes inside your parenthesis.


Do you have a file called header.php in a directory called include that's in the same directory you have the index.php file in. the error is telling you that no such file exists.


Hi Gabriel,

Check your path to the file as Shawn mentions.

This project uses an "inc" folder for the includes. It's possible you used that folder but then accidentally put include('include/header.php'); instead of include('inc/header.php');