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 trial

Marlon Bradshaw
Courses Plus Student 841 PointsIncluding the Footer and adding additional pages...
I just watched this video and set the files like Hoyt's. All was fine until I INCLUDED the Shirts.php and Href to the Header.php. The Shirts link will not load and gives the error of "Object not found!" I'm a complete layman and reviewed everything line for line. Any clues?
9 Answers

Kevin Korte
28,149 PointsHere is the video where he sets all that up!
This is will likely make a whole lot more sense. :)

Kevin Korte
28,149 PointsIn your shirts.php file you need to require once the config file, and than include the header.php file.
In your header.php file, just build out your head, and your menu.
In you shirts.php file, you'll have something like
<?php
require_once("path/to/config.php");
include(ROOT_PATH . "path/to/header.php");
?>

Marlon Bradshaw
Courses Plus Student 841 PointsWow. I don't think he covered that. It's looks pretty foreign to me lol. Thank you. I will try it out.

Kevin Korte
28,149 PointsIt's covered. This is where I learned how to do that. That code is almost cut and paste from Randy's lessons. Let me know if that fixes you up.
For kicks, your config.php should look something like
<?php
define("BASE_URL", "/folderroot/");
define("ROOT_PATH", $_SERVER["DOCUMENT_ROOT"] . "/folderroot/");
Obviously , replace the "folderroot" with the name of your root folder, inside of the server's root folder (usually htdocs, if you're on local).

Marlon Bradshaw
Courses Plus Student 841 PointsOk. I think I must have missed something. I haven't created a config.php yet. Looks like I need to go back a few lessons.

Kevin Korte
28,149 PointsThats probably where you are getting messed up.

Marlon Bradshaw
Courses Plus Student 841 PointsThanks. Back to the drawing board ugh! I'll let you know what I find.

Marlon Bradshaw
Courses Plus Student 841 PointsGo it!!! I went back through the tutorials and I realized that I created the Shirts.php files in the Include folder and it should be outside of that folder with the Index file. Whew! Thanks for your help.

Kevin Korte
28,149 PointsAwesome man! Good to hear