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 trialPaul Heneghan
14,380 Points<?php include 'inc/favorites.php'; ?> also put file in inc in workspace
Repeated error msg: "don't forget to INCLUDE file" the include statement is correct, and the file exists in the inc folder in my workspace. How hard can this be???
4 Answers
Matthew Carson
5,965 PointsThe file isn't in an 'inc' directory. It's in the same directory as the current file you are in.
<?php include 'favorites.php'; ?>
They should have foreseen this as a possible mistake and given better feedback.
Paul Heneghan
14,380 PointsThanks, Matthew. I thought the same thing earlier, tried it along with all the other variations, but that error msg persists. Just tried it again to make sure I hadn't fat-fingered it, but nope. It just doesn't like any valid answer.
Matthew Carson
5,965 PointsReally?
Double checking by copying that line onto line 7 of the code challenge passes for me.
If yours isn't working that is definitely strange.
Paul Heneghan
14,380 PointsThanks for mentioning that, Matthew. I'll try it in another browser and/or computer now. Very weird.
Paul Heneghan
14,380 PointsAAAARGGGH!!! to infinity.
Chrome did it. Firefox, pffft.
Leah Haist
20,547 PointsThis is the correct answer: <?php include('inc/favorites.php'); ?>
Paul Heneghan
14,380 PointsPaul Heneghan
14,380 PointsThanks for the quick response, Darrell. I tried that, and every variation I could think of: in-line <php?, double-quotes, single. etc. The lesson before this challenge shows the format as I originally wrote, but nothing works, and all generate that same error.