【问题标题】:.htaccess for Zend Debugger, Eclipse and Zend Framework.htaccess 用于 Zend 调试器、Eclipse 和 Zend 框架
【发布时间】:2010-09-27 00:15:42
【问题描述】:

我想在 Eclipse 的 Zend Framework 中调试我的项目。 Zend Debugger 已经开始运行了,现在我在 Eclipse 中的调试工具有问题。它提供了一个额外的 GET 参数,而 Zend 中的项目不喜欢它。

我尝试谷歌搜索并找到this

我修改了 .htaccess 文件,但没有让它工作。

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)?(start_debug=1.*)$ index.php?$2 [L]
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

不知道它是否完全正确,因为page 上的重写规则有一些我的 Apache 无法使用的未知标志。

Eclipse制作的链接是

http://localhost/?debug_start_url=http://localhost/&debug_session_id=1007&start_debug=1&debug_host=127.0.0.1&debug_no_cache=1229359621130&debug_port=10000&send_sess_end=1&original_url=http://localhost/&debug_stop=1

【问题讨论】:

    标签: eclipse debugging zend-framework mod-rewrite zend-debugger


    【解决方案1】:

    我成功使用调试器,我的 htaccess 看起来像这样

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php [QSA,L]
        RewriteCond %{REQUEST_FILENAME} (logs|library|application|config)
        RewriteRule ^(.*)$ index.php
    </IfModule>
    

    这基本上是说,如果 url 不指向存在的目录或文件,则通过我的 index.php(也阻止日志、库、应用程序和配置文件夹,因为有时它们位于文档根目录中由于服务器限制,我的一些项目)。到目前为止,我在任何项目上都没有失败过。

    【讨论】:

      【解决方案2】:

      使用实际的 Zend Framework 1.9.6 和 Zend Debugger,它无需任何特殊更改即可工作

      【讨论】:

        猜你喜欢
        • 2012-05-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-02-26
        • 1970-01-01
        • 2012-03-02
        • 1970-01-01
        相关资源
        最近更新 更多