低調の美國生活

各種疑難雜症

如何在mac上執行PHP?

時代進步了,更簡單的方式就是直接下載 Atom 文字編輯器。


 


Install MAMP

  • All-in-one web server installation package
  • This package includes: Apache, PHP and MySQL, all you need are already here

A Texteditor:Smultron(Free),TextWrangler(Free)

  • This editor must allow you to save as xxx.php, like save the file as .php in the Notepad++ in Windows
  • Dreamweaver is a excellent editor, but it costs


在網域選擇部分,除了Godaddy外,現在還有 NameCheap可供選擇,人如其名,這家的網域管理比 Godaddy還便宜,現在NameChaep一年的管理用費只要3.98美元起跳,很划算!可透個這個NameCheap連結申請網域


網路空間多半都會提供無限網路空間+內置一鍵安裝”Wordpress”的標配,像是Blue Host,而且因為競爭激烈,無限網路空間才每月才3.95美元起跳
Unlimited Web Hosting from Bluehost for only $3.95!

Save the php file in the correct folder: Application/MAMP/hotdocs

  • *>When save, remember to add php to the extension =>for example: xxx =>xxx.php
  • *Open the browser and type in: localhost/xxx.php

Test running: in any browser type in: localhost/xxx.php

發佈於 10月18日2010年