淡水是用xampplite1.7.1,它的php版本是5.2.9。最新版的xampp搭载的是php5.3,淡水的程序跑起来好像有些问题-_-!!
1,下载PDT(PHP Development Tools),地址:http://www.eclipse.org/pdt/downloads/ 我下的版本是PDT 2.1 All In Ones,解压后如果不能运行,请安装JRE安装,因为Eclipse需要JRE才能运行。地址 :http://www.java.com/zh_CN/download/manual.jsp
2,下载XAMPPlite1.7.1这个集成的PHP+MySql运行环境,如果是EXE安装包,就双击安装,如果是ZIP包,就解压运行。地址:http://www.apachefriends.org/en/xampp-windows.html
3,下载XDebug,我下载的是php_xdebug-2.0.4-5.2.8.dll,用这个替换xampplite1.7.1自带的php_xdebug.dll,自带的无法正常调试。地址:http://xdebug.org/download.php
4,编辑php.ini 添加如下到php.ini [XDebug] ;; Only Zend OR (!) XDebug zend_extension_ts=“xampplitephpextphp_xdebug.dll” xdebug.remote_enable=true xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.profiler_enable=on xdebug.profiler_output_dir=“xampplitetmp”
原来php.ini里有;extension=php_xdebug.dll,这里无需去掉注释。因为php5.2.9使用zend_extension_ts来挂载xdebug(php5.3开始用zend_extension挂载,又不一样了)
5,配置Eclipse PDT,进入window->preferences 展开PHP,配置其中的PHP Executables,如图 配置Debug,如图 这样就搞定了,可以不用盗版的zend studio for Eclipse鸟。。。最后,说windows7下搭建。。其实只是个噱头;)
最后修改于 2009-09-12