1 软件下载
1.1 eclipse
这里使用的是eclipse-php
下载地址:
1.2 xampp
这里下载的是精简版
下载地址:
2 集成配置
步骤一:启动eclipse设置一个工作区,例如
步骤二:配置eclipse
windows>>Preferences>>PHP>>PHP Executables>>点击Add
windows>>Preferences>>PHP>>Debug
步骤三:配置xampp
修改xmapp\app\php.ini配置文件,开启XDebug功能
[XDebug]zend_extension = "\tool\xampp\php\ext\php_xdebug.dll"xdebug.profiler_append = 0xdebug.profiler_enable = 1xdebug.profiler_enable_trigger = 0xdebug.profiler_output_dir = "\tool\xampp\tmp"xdebug.profiler_output_name = "cachegrind.out.%t-%s"xdebug.remote_enable = 0xdebug.remote_handler = "dbgp"xdebug.remote_host = "127.0.0.1"xdebug.trace_output_dir = "\tool\xampp\tmp"修改之后访问查看是否有XDebug内容
修改xmapp\xampp\apache\conf\httpd.conf
## DocumentRoot: The directory out of which you will serve your# documents. By default, all requests are taken from this directory, but# symbolic links and aliases may be used to point to other locations.#DocumentRoot "D:/workspace/php"## Note that from this point forward you must specifically allow# particular features to be enabled - so if something's not working as# you might expect, make sure that you have specifically enabled it# below.### This should be changed to whatever you set DocumentRoot to.#
步骤三:新建php项目
在eclipse中,右键>>New>>PHP Project
然后新建php文件,写入
右键页面>>Run As >> PHP Web Page