手把手教你搭建eclipse中的php环境

时间:2022-08-13 03:33:33

1.下载eclipse  建议下载 Eclipse Standard (标准版)

2.在eclipse中下载 PDT(php development tools)

help->Install New Software...
手把手教你搭建eclipse中的php环境
work with:选择 --All Available Sites-- (网速慢的同学稍等一下,刷出列表以后,在下拉框中输入php)

手把手教你搭建eclipse中的php环境
安装完成后回自动重启eclipse;
手把手教你搭建eclipse中的php环境

3.配置php运行环境及debug环境

 1) 下载并安装wamp集成环境
 2) 配置php 本地Run及Debug环境
	1.打开Prefences→PHP→PHP Executables→Execution Environments →Add

手把手教你搭建eclipse中的php环境

	2.打开Prefences→PHP→Debug
手把手教你搭建eclipse中的php环境
	3.本地php Run及Debug配置已经完成
手把手教你搭建eclipse中的php环境
 3配置php远程Debug环境
   1.启动wamp,打开 PHP→php.ini 在结尾处加入 以下代码
   2.重启wamp

手把手教你搭建eclipse中的php环境

zend_extension = "d:/wamp/bin/php/php5.3.13/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll"

[xdebug]
xdebug.profiler_enable=on
xdebug.trace_output_dir="d:/wamp/logs/xdebug-log" ;xdebug 的数据文件目录
xdebug.profiler_output_dir="d:/wamp/logs/xdebug-log" ;xdebug 的数据文件目录
xdebug.auto_trace = On ;开启自动跟踪
xdebug.show_exception_trace = On ;开启异常跟踪
xdebug.remote_autostart = On ;开启远程调试自动启动 Off 关闭远程debug可以将此项设置为Off
xdebug.remote_enable = On ;开启远程调试
xdebug.remote_handler=dbgp ;用于zend studio远程调试的应用层通信协议
xdebug.remote_host=127.0.0.1 ;允许连接的zend studio的IP地址
xdebug.remote_port=9000 ;反向连接zend studio使用的端口
xdebug.collect_vars = On ;收集变量
xdebug.collect_return = On ;收集返回值
xdebug.collect_params = On ;收集参数
xdebugbug.max_nesting_level = 10000
2.打开Prefences→PHP→Debug→Installed Debuggers 选择 XDebug
3.将测试test.php放在D:\wamp\www目录下
  在地址栏输入http://localhost/test.php  eclipse中会产生断点
手把手教你搭建eclipse中的php环境