坐看雲起時

在MacOS上執行Apache & PHP

Posted by: 蘇三 on: 2010/11/24

  1. 打開「系統偏好設定」
  2. 選擇「共享」
  3. 將「網頁共享」打勾
  4. 在瀏覽器網址列輸入 http://localhost ,會出現 It works!
  5. 你的網頁目錄在 /Users/yourname/Sites/ 下面,在瀏覽器網址列輸入 http://localhost/~yourname/ 也可以看到預設網頁。
  6. 到「應用程式」的「工具程式」中,啟動「終端機」
  7. 輸入下面指令
  8. cd /etc/apache2/
    sudo pico httpd.conf

  9. 找到下面那行,移除#
  10. #LoadModule php5_module libexec/apache2/libphp5.so

  11. 按^X儲存並退出pico
  12. 輸入下面指令
  13. sudo apachectl restart

  14. 在自己的網頁目錄下面放一隻phpinfo的程式,會看到PHP相關資訊。

參考網頁:

標籤: , ,

發表迴響

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

連結到 %s

美味書籤

 

十一月 2010
« 七月   五月 »
1234567
891011121314
15161718192021
22232425262728
2930  

足跡

蘇三

Follow

Get every new post delivered to your Inbox.