Netbeans PHP 项目 Apache 设置 -
我在 Netbeans PHP 中建立了一个名为 testphp 的项目。它有一个名为 Index.php 的文件。我已添加到 html 并尝试了运行和调试。
我从 Firefox 收到以下消息:
(网址: http://localhost/TestPHP/index.php?XDEBUG_SESSION_START=netbeans-xdebug ) 未找到:在此找不到请求的 URL /TestPHP/index.php 服务器。 http://localhost 返回“It Works!”
虚拟目录“TestPHP”似乎也不存在。能 有人提出一些解决问题的建议吗?
Ubuntu:10.10 Apache:2.2.16(Ubuntu)PHP:PHP 5.3.3-1ubuntu9.3 Suhosin-Patch 版权所有 (c) 1997-2009 PHP Group Zend Engine v2.3.0,版权所有 (c) 1998-2010 Zend Technologies 使用 Xdebug v2.1.0,版权所有 (c) 2002-2010,作者:Derick Rethans
I've set up a project called testphp in Netbeans PHP. It has one file called Index.php. I've added to the html and have tried both run and debug.
I receive the following message from Firefox:
(URL:
http://localhost/TestPHP/index.php?XDEBUG_SESSION_START=netbeans-xdebug)
Not Found: The requested URL /TestPHP/index.php was not found on this
server. http://localhost returns "It Works!"The virtual directory "TestPHP" does not appear to exist either. Can
someone suggest some pointers for tracking down the problem?Ubuntu : 10.10 Apache : 2.2.16 (Ubuntu) PHP : PHP 5.3.3-1ubuntu9.3
with Suhosin-Patch Copyright (c) 1997-2009 The PHP Group Zend Engine
v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的项目实际上并不是由本地服务器提供服务。 “它有效!”输出是您的服务器正在输出的默认页面,因为没有实际的文件可供它服务。
NetBeans“本地网站”项目配置假定您的 PHP 源代码将存储在本地服务器的 Web 文档目录中。
如果您查看 NetBeans 文档,您会看到当您“运行”项目时,使 NetBeans 自动将项目文件复制到相应的 Web 服务器目录的选项。
Your project isn't actually being served by your local server. The "It Works!" output is a default page your server is outputting because there are no actual files for it to serve.
The NetBeans "Local Web Site" project configuration assumes that your PHP sources will be stored in your local server's Web documents directory.
If you look at the NetBeans docs, you'll see there's an option to make NetBeans automatically copy your project's files to the appropriate web server directory when you "Run" your project.