Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在此服务器上找不到请求的URL[文件名].php_Php_Apache_Ubuntu_Netbeans_Localhost - Fatal编程技术网

在此服务器上找不到请求的URL[文件名].php

在此服务器上找不到请求的URL[文件名].php,php,apache,ubuntu,netbeans,localhost,Php,Apache,Ubuntu,Netbeans,Localhost,我尝试将Netbeans PHP项目作为本地网站运行(在本地服务器上运行),但是,当我运行它时,出现了404 not found错误。错误消息是: 找不到 在此服务器上找不到请求的URL/index.php。 本地主机端口80上的Apache/2.4.7(Ubuntu)服务器 当我试图访问localhost/test.php时,出现了相同的错误。我使用/etc/init.d/apache2 start和sudo/etc/init.d/MySQL start命令打开了Apache和MySQL。这是

我尝试将Netbeans PHP项目作为本地网站运行(在本地服务器上运行),但是,当我运行它时,出现了404 not found错误。错误消息是:

找不到

在此服务器上找不到请求的URL/index.php。 本地主机端口80上的Apache/2.4.7(Ubuntu)服务器


当我试图访问
localhost/test.php
时,出现了相同的错误。我使用
/etc/init.d/apache2 start
sudo/etc/init.d/MySQL start
命令打开了Apache和MySQL。这是我的Netbeans中的PHP设置。我是否需要将项目连接到服务器或进行其他配置?

将您的代码也发布到
.htaccess
文件中,您保存了哪些文件?@sa-7我找不到它。它应该在项目文件夹下吗?
.htaccess
在项目下folder@sa-不,我没看见。我使用了ls-a命令,但仍然找不到它