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

PHP

PHP Issues

I am following the tutorials and also implementing my own pages into my htdocs as well. I have a index.php, stylesheet.css and multiple other files in my htdocs. When I go to local host to view these, none of css or include 'header' is visible. Do you know what the problem might be? Does my mamp have to be within the htdocs? I have it in the application folder. I have a mac.

You need to be sure the paths to the header and css files are correct.

What does the top of your index.php look like?

1 Answer

<?php include('include/header.php'); ?>

<link rel="stylesheet" href="css/stylesheet.css" type="text/css">

Is at the top and I have my stylesheet in a css folder within htdocs and my header file in a include folder.

Does the MAMP's application location have anything to do with this?