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 trialAlain Breton
2,656 Pointscan't display LOCALHOST files nor INDEX.php with MAMP (Apache)
At first, the local host didn't display files but the browser could detect index.html. After renaming it to INDEX.php, only got a white page from the browser. Been using MAMP v. 3.0.7.3 (loading Apache and MySQL)
2 Answers
thomascawthorn
22,986 PointsThrow this at the very top of your script - before anything else:
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
You should get some error messages back. If so, what do they say?
Alain Breton
2,656 PointsThanks! This command is helping me solve several problems in my code! :)
simhub
26,544 Pointssimhub
26,544 Pointsif you already add php code like - "<p>© <?php echo date('Y'); ?> 2012 Shirts 4 Mike</p>" on to the page it could be a syntax error you ran into. Something like a missing php end tag "?>".