Netbeans 不将源文件复制到 Web 文件夹
我正在使用 Netbeans 开发 HTML/PHP 站点,并且运行配置设置如下:
项目 URL: http://localhost/杰布 项目文件夹:C:\Documents and Settings\John\My Documents\NetBeansProjects\JEB 源文件夹:C:\Documents and Settings\John\My Documents\NetBeansProjects\JEB Web 根目录:
选中“将文件从源文件夹复制到另一个位置”选项,并且复制到文件夹位置为:C:\xampp\htdocs\JEB。
问题是,当我编辑项目文件夹中的文件,然后单击“运行”时,我希望它们复制到 Web 位置 (C:\xampp\htdocs\JEB),然后在浏览器中运行。但这并没有发生。这些文件没有被复制,因此我看到了以前位于 C:\xampp\htdocs\JEB 文件夹中的文件的旧版本。 (我想,我以前曾经有过这个工作。)
我是否误解了它是如何工作的?我以为你应该编辑 Source 文件夹中的文件,当我在本地运行项目时,它们会自动复制到我的 Web 服务器文件夹中。我检查了 NetBeans 论坛,发现另一个人也遇到此问题,但没有有效的解决方案。我在使用 Netbeans 6.5.1 时遇到了这个问题,所以我升级到了 6.7.1,但仍然没有成功。
谢谢。
I'm using Netbeans to develop an HTML/PHP site and I have the Run Configuration set as follows:
Project URL: http://localhost/JEB
Project Folder: C:\Documents and Settings\John\My Documents\NetBeansProjects\JEB
Source Folder: C:\Documents and Settings\John\My Documents\NetBeansProjects\JEB
Web Root:
The "Copy files from Sources Folder to another location" option is checked and the Copy to Folder location is: C:\xampp\htdocs\JEB.
The problem is, when I edit files in the Project Folder, and then click Run, I'm expecting them to copy to the web location (C:\xampp\htdocs\JEB) and then run in the browser. But that's not happening. The files are not getting copied over so I'm seeing the old versions of the files that were previously in the C:\xampp\htdocs\JEB folder. (I had this working once before, I thought.)
Am I misunderstanding how this works? I thought you were supposed to edit the files in the Source folder, and they would automatically be copied to my web server folder when I ran the project locally. I've checked the NetBeans forums and found one other person with this problem, but no working solution. I was having this problem with Netbeans 6.5.1 so I upgraded to 6.7.1 and still no luck.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也遇到了这个问题,这似乎是 NetBeans 中的一个错误。我使用的是 Ubuntu Linux 9.04 以及 NetBeans 6.5 和 6.7.1。
当这种情况发生在我身上时,我会删除目标位置中的所有文件,然后再次运行该项目。当 NetBeans 发现那里没有文件时,它会复制最新版本。从那时起,它通常可以正常工作(即每次运行项目时自动将文件从源文件夹复制到目标文件夹)。有时我还必须重新启动 NetBeans 才能正常工作。
I had this problem too and it seemed to be a bug in NetBeans. I was using Ubuntu Linux 9.04 with NetBeans 6.5 and 6.7.1.
When it happened to me, I would delete all of the files in the destination location and then run the project again. When NetBeans sees that there are no files there, it copied the latest version over. From then on it usually worked correctly (i.e. automatically copying files from the source to destination folder every time I ran the project). Sometimes I also had to restart NetBeans for this to work correctly.
不是解决方案,但可以解决。
创建文件所在目录的 XAMPP 别名,请参阅:在 htdocs 之外制作 XAMPP/Apache 服务文件
Not a solution, but work around.
Create a XAMPP Alias to the directory where your files are located, see: Make XAMPP/Apache serve file outside of htdocs