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 trialJosh Frazier
1,551 PointsPHP: Starting the Project
I'm not sure exactly what I did wrong. It said to rename the file extension from index.html to index.php. When I refreshed the root, it turned to a white screen. The tutorial video shows the .php implemented with CSS active. Any ideas?
Josh Frazier
1,551 PointsThanks for replying! I uploaded the code from the index.php
4 Answers
Hampton Paulk
5,093 PointsThanks for posting your code here
Usually when the screen goes white you are looking for a syntax error. You can use a process of elimination to hunt these down in the future. I started by just cutting out large sections of code to narrow it down. In this case the error is in the <head> section of your code.
<title><?php echo "Shirts 4 Mike";?>/title>
Take a look at the closing tag for the title it seems you are missing a open "<" symbol.
Josh Frazier
1,551 PointsThanks Hampton! That worked. I'll continue the adventure!
Michael Immordino
Courses Plus Student 6,749 PointsNeed a little more information. Are you trying to run this on a windows or mac? Did your test.php file work properly when you attempted to run it (from the getting started with PHP stage)?
Josh Frazier
1,551 PointsI am running on a Mac using MAMP. I use Text Wrangler as my text editor. Everything worked great until the video step where we changed the extension from .html to .php. It's killing me not being able to continue!
Philip Powis
7,625 PointsI had the same issue. It turned out I was doing <? php echo RATHER THAN: <?php echo. Newbie Mistake on my part!
Josh Frazier
1,551 PointsI am running on a Mac using MAMP. I use Text Wrangler as my text editor. Everything worked great until the video step where we changed the extension from .html to .php. It's killing me not being able to continue!
Michael Immordino
Courses Plus Student 6,749 PointsJust to confirm, you're current folder structure looks like this correct? And if you change the .php back to .html the page displays fine correct?
htdocs --css --img favicon.ico index.php test.php
Michael Immordino
Courses Plus Student 6,749 PointsUgh at markdown, lets try this again:
htdocs
--css
--img
favicon.ico
index.php
test.php
Josh Frazier
1,551 PointsYes...it looks like that and the when I turn it back to the .html extension the page works perfectly.
Hampton Paulk
5,093 PointsHampton Paulk
5,093 PointsThere could be multiple issues happening here, would you mind posting the content of the index.html/php file here https://gist.github.com/ and lets go from there?