向 NetBeans PHP 项目添加更多源文件夹
无论是否有插件,是否可以向 PHP 项目添加更多源文件夹,就像在 Java 项目中一样?
我已经下载并测试了 Java 版本的 NetBeans,显然可以添加更多源文件夹。但 PHP 版本没有?
Is it possible, with or without plugin, to add more source folders to a PHP project, just like in a Java project?
I have downloaded and tested the Java version of NetBeans, and there is clearly possible to add more source folders. But not in the PHP version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
当您右键单击项目面板 (Netbeans 6.9.1) 时,会出现一个选项“项目组”。这允许您将当前项目(在本例中为 php 和 js 项目)添加为一组并作为一个打开。
对于自动打开用于参考的其他项目也很有用。
When you right-click in the projects panel (Netbeans 6.9.1), there's an option 'Project Group'. This allows you to add the current projects (In this case the php and the js project) to be grouped and opened as one.
Also useful to automatically open additional projects used for reference.
在项目属性下,源文件夹只有一个。
但是,如果您尝试使用其他文件夹中的文件,则可以将文件夹添加到 PHP 包含路径。
Under project properties, the source folder is only one.
However, you could add folders to the PHP Include Path if you are trying to use files from another folder.
目前,NetBeans PHP 项目似乎不支持多个源文件夹。
我已向 NetBeans 的 Bugzilla 添加了功能请求: http://netbeans.org/ bugzilla/show_bug.cgi?id=180889
At this time, it looks like NetBeans PHP projects does not support multiple source folders.
I have added a feature request to the NetBeans' Bugzilla: http://netbeans.org/bugzilla/show_bug.cgi?id=180889
“全局包含路径”和“PHP 包含路径”对我不起作用。
我个人的解决方案是在
include/include_once
语句之前添加extra_path
,如下所示:"Global include path" and "PHP include path" does not work for me.
My personal solution is to add the
extra_path
before theinclude/include_once
statements in this way:您可以从以下位置添加所有新创建的 PHP 项目的路径:
netbeans options > PHP部分>全局包含路径
,或者您可以在项目的“项目属性”中添加项目特定的包含路径(右键单击项目视图中的项目”,然后从左侧部分选择“PHP 包含路径”。
尽管您不允许编辑项目包含的源。您还可以在 Netbeans 中创建一个附加项目并将其命名为“my-include-path”,然后将所需包含路径中的所有文件夹添加到该项目中,现在您可以在其中编辑包含的文件。这个项目。
you can add paths for all newly created PHP projects from:
netbeans options > PHP section > Global include path
or you may add project specific include paths in a project's "project properties" (right click on a project in the projects view", and then choose "PHP Include Path" from the left side section.
although you are not allowed to edit a project included sources. you might as well create an additional project in Netbeans and call it like "my-include-path", then add all the folders in your desired include paths to this project. now you can edit your included files in this project.