您的位置:首页 > 编程语言 > Java开发

eclipse开发调试wordpress(一)-安装php开发环境

2013-03-31 12:10 531 查看

1 软件下载

1.1 eclipse

这里使用的是eclipse-php
下载地址:http://archive.eclipse.org/technology/epp/downloads/release/helios/SR1/eclipse-php-helios-SR1-win32-x86_64.zip

1.2 xampp

这里下载的是精简版
下载地址:
http://www.apachefriends.org/zh_cn/xampp-windows.html
 

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 = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "\tool\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "\tool\xampp\tmp"


修改之后访问http://localhost/xampp/phpinfo.php查看是否有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.
#
<Directory "D:/workspace/php">


 

步骤三:新建php项目

在eclipse中,右键>>New>>PHP Project

然后新建php文件,写入

<?php
echo "Welcome http://linjunlong.com 
?>


右键页面>>Run As >> PHP Web Page



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐