PHPStorm+XAMPP开发环境搭建
- 下载Phpstorm:http://www.jetbrains.com/phpstorm/download/#section=windows-version
- 选择license server。然后复制http://jetbrains.tencent.click/ 进行激活
- 下载XAMPP:https://www.apachefriends.org/zh_cn/index.html
配置XAMPP:
- 配置 httpd.conf
将245/246行 DocumentRoot 和Directory路径改为 “D:/PHP” (自己的工作空间)项目文件存放在这里
- 配置php.ini
在文件末尾添加以下代码
[XDebug]
zend_extension = "你的XAMPP路径\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "你的XAMPP路径\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = on
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "你的XAMPP路径\tmp"
xdebug.remote_port = 9000
如下图所示:
配置PHPStorm
- 新建一个PHP工程
- 点击Edit configurations
- 点击+号选择PHP Web Application
- 在弹出的配置页面添加一个新的Server
- 继续完成配置
- 新建一个php文件,点击运行按钮即可看到效果
本文介绍如何使用PHPStorm和XAMPP快速搭建本地PHP开发环境,包括下载安装软件、配置XAMPP服务器及php.ini文件、激活PHPStorm等步骤。
3765

被折叠的 条评论
为什么被折叠?



