running php on mamp [closed]

2020-07-09 06:22发布

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

标签: php mamp
4条回答
劳资没心,怎么记你
2楼-- · 2020-07-09 07:07

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

查看更多
再贱就再见
3楼-- · 2020-07-09 07:09

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.

查看更多
我命由我不由天
4楼-- · 2020-07-09 07:15

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/

查看更多
你好瞎i
5楼-- · 2020-07-09 07:25

/Applications/MAMP/htdocs/hello.php

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

:)

查看更多
登录 后发表回答