What steps have you taken to set up MAMP? Are you using the default folder, or have you set up your won etc? What are you pointing your browser to? In what form have you saved your code? As something like page.php?
I’ve installed MAMP exactly as prescribed in the book. There is a MAMP folder in Applications.
I’m able to access MySQL through the Terminal, and when I got to http://localhost – I get the correct “It Works” message. So, MySQL and Apache are working – it’s just PHP that seems to not be engaged (locally).
Now, I want to start playing around with the topics, so I have a folder on my desktop with the sample projects from the SitePoint site. But when I click the “I’m Kevin” link from Chapter 1, when it goes to the .php page, it doesn’t display correctly. I see the literal code displayed…
it sounds like you haven’t got your sample projects in MAMP’s document root folder.
I’m using XAMPP (which is basically a MAMP equivalent) but the concepts will be the same.
you need to find which folder on your mac your http://localhost points to (it will be somewhere under your MAMP installation) and put your project folders there.
say you have a project called proj_1 with a home page called index.php
then when you put the proj_1 folder in MAMP’s document root folder, entering http://localhost/proj_1/ in your browser should then open up index.php