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:
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.
Courtney WhitingConversion Lead / Information ArchitectAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
PHP is normally set up to run when you install MAMP.   Is phpMyAdmin working?
Courtney WhitingConversion Lead / Information ArchitectAuthor Commented:
Yes, all of that is working and HTML is displaying fine through the server, but PHP files are not displaying.
Dave BaldwinFixer of ProblemsCommented:
If phpMyAdmin is working then PHP is working.  It is a PHP application.  What else is in that directory?
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Courtney WhitingConversion Lead / Information ArchitectAuthor Commented:
I made another folder inside of htdocs. There is an HTML file in there as well called test.html and my PHP file.
Dave BaldwinFixer of ProblemsCommented:
Your PHP file does have a 'php' extension like 'hello.php', right?  I would try putting it in the 'htdocs' and run it there.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Courtney WhitingConversion Lead / Information ArchitectAuthor Commented:
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!
Dave BaldwinFixer of ProblemsCommented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.