I already installed MAMP in my macbook pro. I want to run a php. what can i do?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
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
If you have done everything right, open your browser and type this:
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.
Depending on the port settings of MAMP (Preferences -> Ports) you have to call
http://localhost:8888/filename.php
(MAMP ports) orhttp://localhost/filename.php
(default ports). The file "filename.php" have to be located in this folder: /Applications/MAMP/htdocs//Applications/MAMP/htdocs/hello.php
Will then appear in http://localhost:8888/hello.php
:)