【发布时间】:2012-06-14 18:47:18
【问题描述】:
我的项目的目录结构是这样的:-
/var/www/includes//var/www/classes/
/var/www/public/css//var/www/public/js//var/www/public/index.php
webroot 是/var/www/public,因此访问测试域localhost.dev 将提供public 目录中的文件,因此将运行/var/www/public/index.php。无需像localhost.dev/public/index.php一样访问
问题是当我在Netbeans中创建项目时,我必须设置索引文件,以便可以使用xdebug和Netbeans调试项目。
因此,在添加项目时,我提供了 /var/www 作为项目源文件夹 (Sources Folder),因为 includes 和 classes 在此文件夹中。在下一个项目配置屏幕 (Choose Project > Name and Location > file path is taken as Run Configuration) 中,我被要求输入 Project URL 和 index file。由于index.php 文件实际上在/var/www/public/ 下,所以当我浏览文件并选择它时,索引页面的url 被视为localhost.dev/public/index.php 而不是localhost.dev/index.php。这使我无法调试项目。
当所有源文件都不在 web 根目录中并且项目要使用 xdebug 调试时,任何人都可以指出如何将项目添加到 Netbeans。
【问题讨论】: