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 Build a Simple PHP Application Getting Started with PHP Your First PHP File

Brian Platt
Brian Platt
5,009 Points

Need Help with Exercise and Server

Hey guys! I am having trouble with my server reading my PHP file at localhost/test.php It keeps reading my original .php file even though MAMP is up and I have continually saved the new PHP file in text editor. Not sure what to do but thought I would ask someone smarter than me. Also, I have gotten the green Congrats! banner on the top of this exercise that says "Here's some code from a basic HTML file. Add a PHP command that would display the name of our website, Shirts 4 Mike, inside the H1 tag. Remember to use an opening PHP tag, a semi-colon, and a closing PHP tag as part of the command." but it won't let me continue. Can someone help? Thanks, Brian

2 Answers

Andrew Shook
Andrew Shook
31,709 Points

Brian, make sure you are saving you php file into the httpdocs folder inside of mamp. Next time you save click "save as" and it will show you where the file is saving. If you are not saving the changes to that file then mamp can't read the changes. Your second problem is likely a bug. Just click on "Build a Simple PHP Application" at the top left hand corner and this will take you back to the course overview page. You should be able to find the next video from there.

Brian Platt
Brian Platt
5,009 Points

Andrew, you are a hero, you got it up and running on both questions! Thanks! Brian