windows 未找到 XAMPP 对象错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19942229/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XAMPP Object not found error
提问by crayden
I have just installed XAMPP on my machine, and when trying to access sub folders in htdocs I get the following error.
我刚刚在我的机器上安装了 XAMPP,当尝试访问 htdocs 中的子文件夹时,我收到以下错误。
Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.19"
未找到对象!在此服务器上找不到请求的 URL。如果您手动输入了 URL,请检查您的拼写并重试。
如果您认为这是服务器错误,请联系网站管理员。
错误 404
本地主机
Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.19"
What default security changes do I need to make in order to access child folders of htdocs? Thanks!
为了访问 htdocs 的子文件夹,我需要进行哪些默认安全更改?谢谢!
采纳答案by Drixson Ose?a
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
You're having problem because the object really doesn't exist in your htdocs directory.
You don't have to append xampp
after localhost or 127.0.0.1 because xampp
will treat it as an object or a folder under htdocs.
您遇到了问题,因为该对象确实不存在于您的 htdocs 目录中。您不必xampp
在 localhost 或 127.0.0.1 之后追加,因为xampp
会将其视为 htdocs 下的对象或文件夹。
if you want to access your blog, make sure you have a blog folder under htdocs and put in your URL localhost/blog
如果您想访问您的博客,请确保您在 htdocs 下有一个博客文件夹并输入您的 URL localhost/blog
回答by cyber8200
Just make sure you have the .htaccess
in your project's public directory
只要确保您.htaccess
在项目的公共目录中有
If you don't have the file then create one and paste the below code in your .htaccess
file.
如果您没有该文件,则创建一个并将以下代码粘贴到您的.htaccess
文件中。
Code:-
代码:-
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ / [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
回答by stipe567
well, i had a similar problem, so when i entered, lets say: localhost/test.php I would got Object not found warning! I solved my problem when i realized that windows changed my test.php into this test.php.txt. I changed my extension and voila! problem solved I could finaly acceses localhost/test.php.
好吧,我遇到了类似的问题,所以当我输入时,让我们说:localhost/test.php 我会收到 Object not found 警告!当我意识到 Windows 将我的 test.php 更改为这个 test.php.txt 时,我解决了我的问题。我改变了我的分机,瞧!问题解决了我最终可以访问 localhost/test.php。
回答by user3165061
Drixson Ose?a you are right but when you newly install xampp on your system "Object not found!
Drixson Ose?a 你是对的,但是当你在系统上新安装 xampp 时“找不到对象!
"The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 localhost Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6"
“在此服务器上找不到请求的 URL。如果您手动输入了 URL,请检查您的拼写并重试。如果您认为这是服务器错误,请联系网站管理员。错误 404 localhost Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6"
However all folder in the htdocs but only open is that xampp website because of index.php error, so that's not a big deal just remove the index.html and index.php and try to open localhost again you'll be succeed.
但是,由于 index.php 错误,htdocs 中的所有文件夹只是打开的是那个 xampp 网站,所以这没什么大不了的,只需删除 index.html 和 index.php 并尝试再次打开 localhost 你就会成功。
回答by Aadil
Agree @Drixson Ose?a: You should not write localhost/xampp/...., else write for e.g: localhost/mw-config/index.php
同意@Drixson Ose?a:你不应该写 localhost/xampp/....,否则写例如:localhost/mw-config/index.php
回答by Hersh Dhillon
Make sure you also start the MySQL service in Xampp control panel. This might resolve this.
确保您还在 Xampp 控制面板中启动 MySQL 服务。这可能会解决这个问题。
回答by Hersh Dhillon
The issue is the object(project) folder and it is really not in the localhost.
问题是对象(项目)文件夹,它实际上不在本地主机中。
Check the following things (Windows User)
检查以下事项(Windows 用户)
1.project folder in htdocs
1.htdocs中的项目文件夹
2.spelling of the project folder in htdocs C:\xampp\htdocs\projectname
2.在htdocs目录的项目文件夹的拼写 \ XAMPP \ htdocs中\项目名称:C
3.Public folder inside project folder C:\xampp\htdocs\projectname\public
3.项目文件夹内的公共文件夹 C:\xampp\htdocs\projectname\public
回答by Paichu
First you have to check if FileZilla is running on xampp control panel Than such error can occur You have to stop the FileZilla service from Xampp control panel
首先,您必须检查 FileZilla 是否在 xampp 控制面板上运行,否则可能会发生此类错误您必须从 Xampp 控制面板停止 FileZilla 服务
回答by medBouzid
I had recently the same issue, It might not be the same as your case, but if anyone has a similar situation as mine, somehow I deleted the .htaccess file in the root of my app, so I copied it back from a backup and it worked
我最近遇到了同样的问题,这可能与您的情况不同,但是如果有人遇到与我类似的情况,我以某种方式删除了应用程序根目录中的 .htaccess 文件,因此我从备份中将其复制回有效
回答by Josiah Nunes
Check if you have the correct file mentioned in form statement in HTML:
检查您是否在 HTML 中的表单语句中提到了正确的文件:
For eg:
例如:
form action="insert.php" method="POST">
</form>
when you are in trial.php but instead you give another fileName
当你在 trial.php 中,但你给了另一个文件名