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

本文指导如何在Eclipse中安装PDT插件,并配置WAMP集成环境来实现本地和远程PHP开发环境的搭建。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

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

help->Install New Software...

work with:选择 --All Available Sites-- (网速慢的同学稍等一下,刷出列表以后,在下拉框中输入php)


安装完成后回自动重启eclipse;

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

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

	2.打开Prefences→PHP→Debug

	3.本地php Run及Debug配置已经完成

 3配置php远程Debug环境
   1.启动wamp,打开 PHP→php.ini 在结尾处加入 以下代码
   2.重启wamp

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中会产生断点




评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值