Object not found in xampp

半城伤御伤魂 提交于 2019-12-06 12:14:50

问题


I have got a problem using xampp. I hope u guys are able to solve it.

  1. When i type in the address "localhost" it just shows "It works". But when i type "localhost/xampp" then it takes me to the welcome page of xampp. Why is that when everybody gets that just typing "localhost"?

  2. I created a simple php hello world program to test under the folder htdocs and named it test.php. Then when i type in "localhost/xampp/test.php" it shows the message shown below-

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 9/3/2013 2:23:28 AM Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1

What should i do?


回答1:


Check if in httpd.conf file the DocumentRoot param is pointing to the folder htdocs.




回答2:


I had the same problem but no where did I find a solution.
The solution is actually quite trivial, silly even :)

I wrote my hello world file in notepad and when saving I typed: test.php

but I failed to change the "save as type" option from "Text Document" to "All Files".

Yup, that's it and it worked!

I am assuming you have already found your solution. I hope this helps somebody.




回答3:


ANSWER

just simply set the path as http:// localhost/project_folder or file_name

NOTE:

no need to put http:// localhost /xampp/htdocs/project_folder or file_name-ERROR



来源:https://stackoverflow.com/questions/18580329/object-not-found-in-xampp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!