配置 Phpstorm + Xdebug + xampp
2015-07-23 15:06
531 查看
配置 Phpstorm + Xdebug + xampp
1 Xampp安装好xampp,配置 httpd.conf
在xampp面板中
![](file:///C:/Users/Administrator/AppData/Local/YNote/data/sunlianqun555@163.com/4a87fd2f5c434b9caad9294a0ae23248/b20.tmp.png)
单击后会出现一些配置文件,httpd.conf位于第一个
将DocumentRoot 路径改为 "G:/PHP" (我的工作空间),以后项目就放在这个文件夹里。
配置 php.ini(打开方式如上)
在Windows 下的配置:(这些代码位于php.ini的最后,将原来的带;的代码覆盖成下面所提供的就可以,此时运行phpinfo()函数可以看到在配置中有Xdebug)
[XDebug]
zend_extension = "D:\XAMPP\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\XAMPP\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_port=9000
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "D:\XAMPP\tmp"
xdebug.idekey= PHPSTROM
2 PhpStorm
在File->settings中
![](file:///C:/Users/Administrator/AppData/Local/YNote/data/sunlianqun555@163.com/e9180baa7d44460d827a57474b25068d/112c.tmp.png)
如图所示配置setting中的4个地方,最后在图片所示的localhost位置单击(若没有在这里配置过,那么会没有内容显示)
![](file:///C:/Users/Administrator/AppData/Local/YNote/data/sunlianqun555@163.com/bfef3d1838074e41abd8431464d81d0b/clipboard.png)
单击editconfiguration,可以看到如下所示
![](file:///C:/Users/Administrator/AppData/Local/YNote/data/sunlianqun555@163.com/48fa67f9d0a54daa859f4d08c8942a66/13b2.tmp.png)
单击左上角+符号,选择PHP Built-in Web Server,按如图所示配置,Document root 指你想运行项目的根目录。右侧的port可以填写8789等4位数,
现在就可以运行你的程序啦,如在网址中打,localhost:8789/index.php(假设你的根目录下的index.php是你的项目的入口)。
相关文章推荐
- 知识点二:contentProvider的使用
- php cookie不刷新及时生效的实现代码
- 利用ApnsPHP包向IOS推送消息
- PHP框架Yii系列教程(一):入门实例
- PHP中VC6、VC9、TS、NTS版本的区别与用法详解
- YII安装步骤(windows)
- FileOutputStream类,实现换行写入和追加写入的解决办法
- PHPCMS config.php 学习笔记
- 安装php5.2.3应注意的地方
- 调用FileOutputStream中的三种write方式
- IOS苹果购买PHP服务器端验证(订阅购买和一次性购买通用)
- FileOutPutStream的使用
- php文件上传之单文件上传
- 通过php下载文件并重命名
- apaphe2.4+php5.6自定义配置
- 在PHP中如何使用消息列队
- PHP流程控制的替代语法
- thinkphp去掉index.php
- 开源php中文分词系统SCWS安装和使用实例_php实例
- vsftpd配置文件详解