Localhost/info.php 显示 Object not found 怎么办?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21811684/
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
Localhost/info.php is showing Object not found what to do?
提问by Anirban Nag 'tintinmj'
I successfully installed xampp 1.8.3(windows-7-x64) and then started Apache server. I can access the server through localhostbut can't see the localhost/info.phpfile. My friend also did the same and he can view the php info.
我成功安装了 xampp 1.8.3(windows-7-x64),然后启动了 Apache 服务器。我可以通过访问服务器localhost但看不到localhost/info.php文件。我的朋友也这样做了,他可以查看php信息。
The error is
错误是
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.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6
未找到对象!
在此服务器上找不到请求的 URL。如果您手动输入了 URL,请检查您的拼写并重试。
如果您认为这是服务器错误,请联系网站管理员。
错误 404
本地主机
Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6
I'm very new to this so maybe I'm asking silly question. Please bear with me.
我对此很陌生,所以也许我在问愚蠢的问题。请多多包涵。
回答by Darius Iko
Check the htdocs directory in the xampp installation directory (e.g: C:\xampp\htdocs) whether there is a file name info.php. Maybe there is no such file. If so, create a file named info.php in the htdocs. To view your php info, replace the info.php content with this code:
查看xampp安装目录下的htdocs目录(如:C:\xampp\htdocs)是否有文件名info.php。也许没有这样的文件。如果是这样,请在 htdocs 中创建一个名为 info.php 的文件。要查看您的 php 信息,请将 info.php 内容替换为以下代码:
<?php
phpinfo();
?>
After save file info.php in the htdocs directory, browse localhost/info.php again in your web browser.
在 htdocs 目录中保存 info.php 文件后,再次在 Web 浏览器中浏览 localhost/info.php。
回答by Robert
create new page and name it whatever U want and write this code simply
创建新页面并将其命名为您想要的任何名称并简单地编写此代码
<?php
phpinfo();
?>
回答by Anirban Nag 'tintinmj'
Now I got it there is a tab for phpinfo. No need for info.phpfile in htdocs.
现在我知道了,有一个用于 phpinfo 的选项卡。不需要info.phphtdocs 中的文件。


However thanks for your inputs.
不过感谢您的投入。

