Windows 平臺搭建 PHP 整合開發環境
Windows 平臺搭建 PHP 整合開發環境
安裝xampp
XAMPP 是一個易於安裝且包含 MySQL、PHP 和 Perl 的 Apache 發行版。XAMPP 的確非常容易安裝和使用:只需下載,解壓縮,啟動即可。
官網地址
點選下載window版本的安裝包,下載完成後點選安裝 next -> next -> … 完成安裝 ,開啟軟體:
開啟Apache服務出現問題:
Apache啟動提示
10:33:43 [Apache] Problem detected!
10:33:43 [Apache] Port 80 in use by “Unable to open process” with PID 4!
10:33:43 [Apache] Apache WILL NOT start without the configured ports free!
10:33:43 [Apache] You need to uninstall/disable/reconfigure the blocking application
10:33:43 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
10:33:43 [Apache] Problem detected!
10:33:43 [Apache] Port 443 in use by “”C:\Program Files (x86)\VMware\VMware Workstation\vmware-hostd.exe” -u “C:\ProgramData\VMware\hostd\config.xml”” with PID 5728!
10:33:43 [Apache] Apache WILL NOT start without the configured ports free!
10:33:43 [Apache] You need to uninstall/disable/reconfigure the blocking application
10:33:43 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
解決辦法:
系統提示80埠和443埠被佔用,通過修改配置檔案可以選擇未被佔用的埠:
1.在\ xampp\apache\conf目錄下 ,開啟httpd.conf,將裡邊的80埠全部改成一個未被佔用的埠,比如8088
2.在 \ xampp\apache\conf\extra目錄下 ,開啟httpd-ssl.conf ,將檔案裡的443埠全部換成一個未被佔用的埠,比如4431
注意:xampp根目錄下有兩個個檔案properties.ini和xampp-control.ini 裡面也涉及到埠的配置,不過我這裡沒有改動,僅僅改動上面檔案的埠就可以正常啟動服務了。
開啟服務成功後,在瀏覽器輸入
安裝PhpStorm
PhpStorm是一個輕量級且便捷的PHP IDE,其旨在提高使用者效率,可深刻理解使用者的編碼,提供智慧程式碼補全,快速導航以及即時錯誤檢查。
官網地址
下載安裝都很簡單就不多說了。它是一款收費軟體,在我大中華這都不是事…
開啟IDE,open一個存在的專案:
這裡htdocs專案是xampp自帶的一個專案,開啟專案如下:
修改index.php
<?php
echo 'hello PHP!';
?>
在瀏覽器開啟
到此,整個整合開發環境搭建完畢,接下來由你盡情的玩耍吧!