【圖文教程】Eclipse for PHP+XAMPP調試配置


一、下載安裝XAMPP

下載地址:https://www.apachefriends.org/download.html,

一路“Next”,安裝完畢。

二、下載Eclipse for PHP

下載地址:https://sourceforge.net/projects/phpeclipse/

直接解壓。

三、配置Eclipse for PHP

四、創建PHP工程

1.在PHP Explorer空白處右鍵->New->Other...

 2.在工程上右鍵->New->Other...

編寫如下代碼:

<?php
phpinfo();
?>

五、配置XAMPP

1.配置虛擬目錄:

在配置文件添加:

    Alias /test "D:/PHP/test"
    <Directory "D:/PHP/test">
        AllowOverride AuthConfig
        Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>

2.配置XDebug

在配置文件添加:

zend_extension="E:/xampp/php/ext/php_xdebug.dll"
[Xdebug]
xdebug.auto_trace = On
xdebug.show_exception_trace = On
xdebug.remote_autostart = On
xdebug.remote_enable = On
xdebug.collect_vars = On
xdebug.collect_return = On
xdebug.collect_params = On
xdebug.trace_output_dir="D:/xDebugLog"
xdebug.profiler_output_dir="D:/xDebugLog"
xdebug.profiler_enable=On
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

3.啟動Apache

六、訪問頁面就可以調試了。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM