手把手教你搭建eclipse中的php環境
阿新 • • 發佈:2018-12-14
1.下載eclipse 建議下載 Eclipse Standard (標準版)
2.在eclipse中下載 PDT(php development tools)
help->Install New Software...
work with:選擇 --All Available Sites-- (網速慢的同學稍等一下,刷出列表以後,在下拉框中輸入php)
安裝完成後回自動重啟eclipse;
3.配置php執行環境及debug環境
1) 下載並安裝wamp整合環境
2) 配置php 本地Run及Debug環境
1.開啟Prefences→PHP→PHP Executables→Execution Environments →Add
2.開啟Prefences→PHP→Debug
3.本地php Run及Debug配置已經完成
3)配置php遠端Debug環境
1.啟動wamp,開啟 PHP→php.ini 在結尾處加入 以下程式碼
2.重啟wamp
-
zend_extension = "d:/wamp/bin/php/php5.3.13/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll"
-
[xdebug]
-
xdebug.profiler_enable=on
-
xdebug.trace_output_dir="d:/wamp/logs/xdebug-log" ;xdebug 的資料檔案目錄
-
xdebug.profiler_output_dir="d:/wamp/logs/xdebug-log" ;xdebug 的資料檔案目錄
-
xdebug.auto_trace = On ;開啟自動跟蹤
-
xdebug.show_exception_trace = On ;開啟異常跟蹤
-
xdebug.remote_autostart = On ;開啟遠端除錯自動啟動 Off 關閉遠端debug可以將此項設定為Off
-
xdebug.remote_enable = On ;開啟遠端除錯
-
xdebug.remote_handler=dbgp ;用於zend studio遠端除錯的應用層通訊協議
-
xdebug.remote_host=127.0.0.1 ;允許連線的zend studio的IP地址
-
xdebug.remote_port=9000 ;反向連線zend studio使用的埠
-
xdebug.collect_vars = On ;收集變數
-
xdebug.collect_return = On ;收集返回值
-
xdebug.collect_params = On ;收集引數
-
xdebugbug.max_nesting_level = 10000
2.開啟Prefences→PHP→Debug→Installed Debuggers 選擇 XDebug
3.將測試test.php放在D:\wamp\www目錄下