本文轉自:http://g.kehou.com/t1018103564.html
Eclipse的PHP插件Eclipse插件安裝。重裝了電腦后,以前配的環境又得重新配過,就當做復習吧。
環境:xp,php-5.2.9,jdk6.2,eclipse3.3
PHPeclipse是什么?
PHPeclipse是Eclipse的一個插件,它為php開發人員提供了一個集成的開發環境。Eclipse官方下載地址:http://www.eclipse.org/
PHPeclipse這個插件包括的功能有:PHP語法分析,調試,代碼格式化,大綱視圖,代碼模板定制等。
PHPEclipse的官方網站是:http://www.phpeclipse.de/,http://www.phpeclipse.net/,http://www.phpeclipse.de/,http://www.phpeclipse.net/
安裝該插件需要什么軟件?
使用PHPeclipse之前你必須安裝一下軟件:
1、Eclipse3.X Downland:http://www.eclipse.org/downloads/
2、jdk5.0/更高版本
3、DBG PHP Debugger matching the PHP version you are using
Downland:http://superb-west.dl.sourceforge.net/sourceforge/dbg2/dbg-2.15.5-win32.zip
4、Eclipse Web Tools Platform Project 1.0.x
具體步驟:
下面就介紹下在以上都安裝好了,怎么在eclipse下加入PHPeclipse插件。
安裝PHPeclipse有三種辦法:
1、Update Site,你可以使用eclipse的update site得到
2、直接從Sourceforge下載ZIP文件
3、通過SVN獲得,這里就不說了,比較麻煩。
在這里只介紹第一種方法。
安裝PHPeclipse最簡單的方法就是在eclipse中加入PHPeclipse的update site,也就是第一種方法,:
如果你使用的是eclipse3.2,升級網址就是:http://update.phpeclipse.net/update/stable/1.1.x
如果是eclipse3.3/3.4,升級網址就是:http://update.phpeclipse.net/update/stable/1.2.x
具體操作:打開eclipse,在菜單工具欄選擇:Help-> Software Updates -> Find and Install
接下來選擇:Search for new features to install,點擊next,下來點擊:new Remote Site
Name: PHPEclipse 1.2.x
URL:http://update.phpeclipse.net/update/stable/1.2.x
點擊ok。
然后在頁面中選擇PHPEclipse1.2.x,點擊finish。
等安裝完畢后,你就可以創建你的php工程了。
建好PHP工程后
下來將DBG php調試模塊加入到eclipse當中:
下載地址:http://superb-west.dl.sourceforge.net/sourceforge/dbg2/dbg-2.15.5-win32.zip
解壓dbg-2.15.5-win32.zip到臨時目錄后,更名x86子目錄下的php_dbg.dll-5.x.x為php_dbg.dll, 拷貝至php安裝目錄下的ext擴展所在目錄,然后修改php.ini, 加入擴展項, 並且新增debug配置段:
[debugger]debugger.enabled = truedebugger.profiler_enabled = truedebugger.JIT_host = clienthostdebugger.JIT_port = 7869