本文目錄一覽:
eclipse php 怎麼用
1.下載eclipse 建議下載 Eclipse Standard (標準版)
2.在eclipse中下載 PDT(php development tools)
help-Install New Software…
work with:選擇 –All Available Sites– (網速慢的同學稍等一下,刷出列表以後,在下拉框中輸入php)
安裝完成後回自動重啟eclipse;
怎樣在eclipse下運行php程序
筆者剛剛接觸PHP-Eclipse,今天剛把debug PHP的方法弄好,發出來與大家共享一下。
第一步:到Eclipse的官網去下載PHP-Eclipse:
第二步:下載Xdebug
第三步:在PHP5裡面找到php.ini,在這個文件的最後面加入如下配置信息:
[xhtml] view plaincopyprint?
[Xdebug]
zend_extension_ts=”C:/Program Files/phpStudy/PHP5/ext/php_xdebug.dll”
xdebug.auto_trace = On
xdebug.show_exception_trace = On
xdebug.remote_autostart = On
xdebug.remote_enable = On
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.profiler_enable = on
xdebug.profiler_output_dir=”C:/Program Files/phpStudy/PHP5/log
這裡要特別注意:如果在文件里有其他的zend_extension_ts,需要注釋掉,否則apache無法啟動。
第四步:啟動apache。
第五步:在eclipse的項目里的Properties裡面找到”PHP Debug”,在PHP Debugger裡面選擇”XDebug”
再配置一下:
第六步:再在Windows-Preferences裡面配置下PHP Servers
接下來,進入debug界面,就可以開始設置斷點進行debug了。
用Eclipse來開發PHP需要怎樣配置
eclipse開發php全過程的搭建帶debug的配置
1:先安裝好java運行環境這個eclipse運行靠的就是這個,自己來安裝吧。
2:安裝好php的運行環境,我是apache+php自己配置的,php的版本是5.3.apache的版本是2.2。把apache的主目錄設置在了D:\phproot。php的主目錄在
D:\php-5.3.8-Win32-VC9-x86。下面才是要說的重點:
1:下載eclipse pdt all in one;
2:下載xdebug;
3:把下載後的dll放在的地方是:
D:\php-5.3.8-Win32-VC9-x86\ext\php_xdebug-2.2.1-5.3-vc9.dll;
4:在php.ini下添加下列語句:
[html] view plaincopyprint?
[Xdebug]
zend_extension=D:\php-5.3.8-Win32-VC9-x86\ext\php_xdebug-2.2.1-5.3-vc9.dll
xdebug.profiler_enable=on
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.show_exception_trace = On
xdebug.remote_autostart = On
xdebug.remote_enable = On
xdebug.collect_vars = On
5:重啟apache,隨便建立一個php文件,來輸出一下phpinfo();如果看到下面截圖則說明安裝成功了。
原創文章,作者:EOUR,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/137862.html