本篇教程为配置 PHPStorm 本地服务器,以方便程序调试。
本地服务器工具:XAMPP for windows 7.1.1-0 / Apache 2.4.25 ( Win32 ) / PHP 7.1.1
PHPStorm 版本:2016.3.2
配置 PHP 解释器
File > Setting > Languages&Frameworks > PHP
![](https://img.haomeiwen.com/i2014911/2151dce938696176.png)
PHP language level: 选择适合的 PHP 版本
CLI Interpreter :点击更多(…)
![](https://img.haomeiwen.com/i2014911/6f13b9a404ce898c.png)
在 CLI Interpreters 中设置:①添加项目;②给项目添加名称,如 PHP_xampp;③在 PHP executable 中找到 xampp/php/ 目录中的 php.exe 文件;④点击 OK 完成配置。
配置 Apache 服务器
File > Setting > Build,Execution,Deployment > Deployment
![](https://img.haomeiwen.com/i2014911/29097039ca2640c7.png)
①点击“+”添加服务器;②给服务器起个名字,例如“Apache_xampp”;③类型选择“ In place ”;④点击 OK 保存。
![](https://img.haomeiwen.com/i2014911/98199eec5fffafc7.png)
保存好 Apache_xampp 的初步设置后,选择 “ Mappings ”,然后找到 xampp/htdocs 中当前开发的 Project 路径,OK保存。
网友评论