running php on mamp [closed]

北战南征 提交于 2019-12-09 16:26:16

问题


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


回答1:


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.




回答2:


/Applications/MAMP/htdocs/hello.php

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

:)




回答3:


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




回答4:


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/



来源:https://stackoverflow.com/questions/2283456/running-php-on-mamp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!