Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

running php on mamp [closed]

Tags:

php

mamp

I already installed MAMP in my macbook pro. I want to run a php. what can i do?

like image 311
Ali_IT Avatar asked Feb 17 '10 18:02

Ali_IT


4 Answers

Depending on the port settings of MAMP (Preferences -> Ports) you have to call http://localhost:8888/filename.php (MAMP ports) or http://localhost/filename.php (default ports). The file "filename.php" have to be located in this folder: /Applications/MAMP/htdocs/

like image 84
Dirk Einecke Avatar answered Nov 15 '22 21:11

Dirk Einecke


/Applications/MAMP/htdocs/hello.php

Will then appear in http://localhost:8888/hello.php

:)

like image 45
Zack Burt Avatar answered Nov 15 '22 21:11

Zack Burt


If you have done everything right, open your browser and type this:

http://localhost

to see if it opens successfully and then you can open your sites.

Also check out the mamp's documentation on how to configure it and run php scripts.

like image 25
Sarfraz Avatar answered Nov 15 '22 22:11

Sarfraz


Drop the PHP file into the HTDOCs folder in MAMP, for example let's call it hello_world.php and now you can run it by going to:

http://localhost/hello_world.php

like image 33
TravisO Avatar answered Nov 15 '22 20:11

TravisO