1. 概述
新建一個項目后,需要配置開發(fā)環(huán)境霉祸。
https://www.jetbrains.com/help/phpstorm/configuring-php-development-environment.html
PHP 開發(fā)環(huán)境需要安裝和配置下面的軟件:
- 網(wǎng)絡(luò)服務(wù)器和PHP解釋器(必要)
- 數(shù)據(jù)庫服務(wù)器
- 調(diào)試工具 debugging tool
- 命令行工具 debugging tool
必要安裝:MAMP軟件轻姿,它包含了Apache http 服務(wù)器, MySQL數(shù)據(jù)庫服務(wù)器, PHP解釋器当悔。https://www.mamp.info/en/windows/
可選擇安裝:
debugging engine
PHP-specific command line tool
PHPUnit tool
2. 安裝MAMP
下載MAMP,安裝到D:/MAMP踢代。
啟動服務(wù)器:
image.png
3. MAMP Phpstorm集成
3.1 集成PHP 可執(zhí)行文件
Settings/Preferences (Ctrl+Alt+S)----> Languages & Frameworks | PHP
image.png
PhpStorm現(xiàn)在將使用與MAMP綁定的PHP。
3.2 集成調(diào)試器 debugger
https://www.jetbrains.com/help/phpstorm/debugging-with-phpstorm-ultimate-guide.html
PhpStorm提供了一個強大的調(diào)試器嗅骄。
(待續(xù))
3.3 集成Apache 服務(wù)器
Settings/Preferences ----> Build, Execution, Deployment ----> Deployment
image.png
3.4 集成MySQL服務(wù)器
image.png
數(shù)據(jù)庫信息:
image.png
下載driver:
image.png
image.png
4 部署
4.1 部署位置的配置
Tools ----> Deployment ----> Configuration
image.png
image.png
完成部署配置薛夜。
4.2 把項目部署到Apache http 服務(wù)器
image.png
image.png