Object not found - XAMPP

情到浓时终转凉″ 提交于 2019-12-01 07:21:57

问题


I recently installed XAMPP on my laptop - windows-7 64-bit. I just wrote a very basic and elementary "Hello World" script in HTML. But, however when i'm trying to run it, it says Object Not found. Error 404.

Here's what i'm doing:

  1. Wrote the script.
  2. Saved it as test.html in xampp/apache/htdocs.
  3. Opened the browser, typed localhost/test.html in the space provided for the URL.

The bizarre thing is, i am able to run the index.html file stored in xampp/apache/htdocs. And i'm also able to run the localhost page. But any new page that i'm creating, i'm unable to run it. Please help me solve this problem.

Thank you in advance :)


回答1:


It seems xampp is not able to locate your file.

Check DocumentRoot setting in XAMPP\apache\conf\httpd.conf to find currently it is pointing to which folder.

If you want you can point it to some other folder like,

D:/phpprojects/

By the way, You sure htdocs is in xampp/apache/htdocs ? Mine is in xampp/htdocs.




回答2:


if problem is in linux Folders not should be cut from Windows into Linux folders permissions not set . change it




回答3:


You just need to change the root of project from xampp/apache/htdocs to xampp/htdocs.

I mean your project folder has to be in xampp/htdocs root .(e.g: xampp/htdocs/project).

And your project address will be localhost/project



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

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