I want to activate PHP to read downloaded files

Joined
Jan 13, 2007
Messages
16
Reaction score
0
Points
1
Location
Houston,Tx
Your Mac's Specs
Mac Mini 2009 2G Ram OS 10.5.8, B&W G3 10.3.9 and 9.2.2, Pismo 10.3.9
I've installed MAMP. I've put the MAMP control widget into the widget library but I don't understand the instructions about "put HTML and PHP files in the htdocs folder". I'm not working with MY files. I'm trying to get some intelligence from the files I've downloaded. So… I want to READ the files. How do I accomplish that? Wonder why Apple would install this stuff and then make it so hard to use or even get to? Thanks for reading this. Dan
 
Joined
Dec 13, 2007
Messages
256
Reaction score
10
Points
18
Location
United States of America
Your Mac's Specs
2.1GHz MacBook with 4GB RAM, Mac OS X 10.6, iLife and iWork ‘09
When you say that you want to "read" the PHP files, do you mean that you want to read their source code (which you can do with TextEdit) or that you want to view them as they would be served by a Web server?

If it's the latter, you basically need to do three things. First, you need to enable PHP. Next you have to enable Apache, and finally you simply place the PHP files in the right spot and view them in your Web browser.

Here are some very in-depth instructions that cover each step in detail. One thing that I didn't see him mention is that you can also use a command-line text editor like vim or nano if you're comfortable with it instead of downloading a new application (just be sure to run it as root so that you can save). Also, he mentions putting the documents in Macintosh HD:Library:WebServer:Documents, but you can put them in your personal Sites folder as well. Then to access them from your browser, go to http://127.0.0.1/~username and you'll see a list of files in your Sites folder (if you get an error, make sure you've enabled Web Sharing in System Preferences).
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top