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

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设置一个工作区,例如

image

 

 

步骤二:配置eclipse

windows>>Preferences>>PHP>>PHP Executables>>点击Add

image

windows>>Preferences>>PHP>>Debug

image

 

步骤三:配置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

image

转载于:https://my.oschina.net/linjunlong/blog/118820

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值