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中![技术分享](http://img.blog.csdn.net/20150723150342350?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
如图所示配置setting中的4个地方,最后在图片所示的localhost位置单击(若没有在这里配置过,那么会没有内容显示)
![技术分享](file:///C:/Users/Administrator/AppData/Local/YNote/data/sunlianqun555@163.com/bfef3d1838074e41abd8431464d81d0b/clipboard.png)
单击editconfiguration,可以看到如下所示