PDA

View Full Version : PHP scripts location




cossie
Jun 23, 2008, 05:55 AM
Hi,

I've been trying to learn PHP, MySQL and SQLite and I've been doing so using a unix account in my Uni, unfortunately it's going to be offline for a while for hardware upgrades.

So I got MAMP to let me work on this stuff from my laptop (MBP running Tiger). Unfortunately, I'm not sure where I should be saving my PHP scripts so that they can access the database tables I've created using MAMP.

I know there's a Library/WebServer folder but when I try to save the files there the PHP scripts don't run when opened in a browser (even simple HelloWorld type stuff).

I can http://localhost:8888/ but it's empty, rather than saving files all over the place I thought I'd ask here if anyone has any advice, help or tutorials.

Thanks :)



a456
Jun 23, 2008, 06:43 AM
When you download MAMP you get a dashboard widget installed. Use this to start servers and open start page.

Save PHP files to htdocs folder. Make sure MAMP folder is located in Applications. Use http://localhost:8888/ and you should see a file list.

I'm learning myself very slowly and so haven't got a grip on the MySQL stuff yet but it would be great to hear from others on this.

I tried installing Locked Area Lite on MAMP but haven't had any luck as yet with that - I think I was trying to run before I could walk.

cossie
Jun 23, 2008, 08:49 AM
Thanks a456 that worked perfectly.

My scripts are able to access the MySQL db that I created too - MAMP is a fantastic application.