Link to home
Start Free TrialLog in
Avatar of Courtney Whiting
Courtney WhitingFlag for United States of America

asked on

PHP files on MAMP

My php files are coming up as a blank screen through MAMP when attempting to open it on localhost:888. Even with simple code like:
<?php
echo "Hello world";
?>

Open in new window


Is there anything special that needs to be done to make php files display? HTML files are displaying fine.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

PHP is normally set up to run when you install MAMP.  https://www.mamp.info/en/   Is phpMyAdmin working?
Avatar of Courtney Whiting

ASKER

Yes, all of that is working and HTML is displaying fine through the server, but PHP files are not displaying.
If phpMyAdmin is working then PHP is working.  It is a PHP application.  What else is in that directory?
I made another folder inside of htdocs. There is an HTML file in there as well called test.html and my PHP file.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SWITCHING THE FOLDER DID IT! Thank you so much! I spent an hour and a half trying to figure it out last night.
Thanks, Dave!
You're welcome.  Keep that little PHP program to check to see if PHP is working in any given directory.  While normally it should, I can think of many situations where it wouldn't and apparently you found one of them.