不会健身的程序员
不是好作家

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

修改xmappappphp.ini配置文件,开启XDebug功能

[XDebug]
zend_extension = "toolxamppphpextphp_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "toolxampptmp"
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 = "toolxampptmp"

修改之后访问http://localhost/xampp/phpinfo.php查看是否有XDebug内容

修改xmappxamppapacheconfhttpd.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 https://linjunlong.com

?>

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

image

赞(0)
转载请注明出处:林俊龙博客 » eclipse开发调试wordpress(一)-安装php开发环境

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

年年岁岁花相识,岁岁年年人不同

给我留言网站地图

谢主隆恩

支付宝扫一扫打赏

微信扫一扫打赏