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.
<?php include "favorites.php" ?> please its not work
<?php include "favorites.php" ?>
help me for solve this problem..its not work
<html> <head> <title>A Few of My Favorite Things</title> </head> <?php include "favorites.php" ?> <body> <h1>A Few of My Favorite Things</h1> </body> </html>
Jennifer NordellTreehouse Teacher
Hi there! You're super close on this one. First, as stated in the instructions, the
favorites.php resides inside the
inc folder. Your code is looking for it in the same folder as this file. So the path needs to be adjusted. Secondly, the include is supposed to come under the heading, but yours comes under the head. Remember, that in HTML we have a
<header>, and headline elements and they all do different things. Headlines are denoted with
The path you need is:
include "inc/favorites.php", but I'm going to leave the placement up to you.
Hope this helps, but let me know if you're still stuck!