如何在localhost XAMPP中打开项目..? [英] How do I open projects in localhost XAMPP..?

查看:174
本文介绍了如何在localhost XAMPP中打开项目..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了XAMPP并且localhost正在运行..但是当我将url作为localhost / projectfilename时,它会给出一个空白页面。?

请帮助我。我试过它也是一样的问题发生了。



我尝试了什么:



I have installed XAMPP and localhost is working..but when I give url as localhost/projectfilename it gives a blank page..?
plz help me. I tried it wamp too same problem occured.

What I have tried:

I have installed XAMPP and localhost is working..but when I give url as localhost/projectfilename it gives a blank page..?
plz help me. I tried it wamp too same problem occured.

推荐答案

大概你知道你需要在文件夹< root>中创建项目页面; \ xampp \ htdocs,其中< root>是你安装xampp的地方(例如c:\ my_web_stuff \ xampp \ htdocs)?



将你的index.php文件放到上面的位置然后你应该准备好了。如果它不起作用,我建议将一个简单的纯HTML文件放在这里,让我们假设您将以下内容保存到文件c:\ my_web_stuff \ xampp \\\\\\\\\\\\\\ br $> b $ b

< head>

< title>我的XAMPP正在运作< / title>

< / head>

< body>

< p> Hello world!< / p>

< / body>

< / html>



您应该可以在浏览器中以http://localhost/hello.html或127.0打开上述内容.0.0 / hello.html的。如果这不起作用,我会质疑你的XAMPP是否真的有效。进入服务(我假设是Windows)并检查Apache服务是否正常运行,并且您不需要输入服务的登录凭据,有时就是这种情况。



应检查 Apache错误日志如果你还有问题。
Presumably you know that you need to create your project page in the folder <root>\xampp\htdocs, where <root> is wherever you have installed your xampp (e.g. c:\my_web_stuff\xampp\htdocs) ?

Put your index.php file into the above location and you should be ready to go. If it doesn't work I'd recommend putting a simple plain HTML file there something like this and let's assume that you save the following to the file "c:\my_web_stuff\xampp\htdocs\hello.html"

<head>
<title>My XAMPP is working</title>
</head>
<body>
<p>Hello world!</p>
</body>
</html>

You should be able to open the above in your browser at http://localhost/hello.html or at 127.0.0.0/hello.html. If that doesn't work I'd question whether your XAMPP is actually working. Go into services (I'm assuming windows) and check the the Apache service is up and running and that you aren't running into a need to enter your sign-in credentials for the service, which is sometimes the case.

The Apache error log should be checked if you're still having problems.


这篇关于如何在localhost XAMPP中打开项目..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆