简体   繁体   English

我的 WampSever 3 Localhost 没有打开我的本地主机页面之一(但可以正常打开其他页面)

[英]My WampSever 3 Localhost isn't opening up one of my local host pages (but opens the others fine)

I have a number of web-projects saved in my localhost (using Wampserver 3).我在我的本地主机中保存了许多 Web 项目(使用 Wampserver 3)。 One of those web-projects uses php and recently it seems to have stopped working.这些网络项目之一使用 php,最近它似乎已停止工作。 By stopped working I mean, it seems to load for a while then gives me the message -通过停止工作我的意思是,它似乎加载了一段时间然后给我消息 -

This site can't be reached.无法访问此站点。 Localhost refused to connect.本地主机拒绝连接。

I had this working before and I guess I changed something and now it's not connecting.我以前有这个工作,我想我改变了一些东西,现在它没有连接。 I can access my php with my localhost password and username so the issue isn't with my local host login details.我可以使用我的本地主机密码和用户名访问我的 php,因此问题不在于我的本地主机登录详细信息。

What I tried to do, just to confirm it was something to do with some php code I had, was I changed my index file to a very simple index.html file:我试图做的,只是为了确认它与我拥有的一些 php 代码有关,是我将索引文件更改为一个非常简单的 index.html 文件:

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

However, even this brings up the same 'refused to connect' error message.但是,即使这样也会出现相同的“拒绝连接”错误消息。 Does this mean it's not a php code issue?这是否意味着它不是 php 代码问题? Again, other web-projects in the same localhost folders seem to work.同样,同一本地主机文件夹中的其他 Web 项目似乎也能正常工作。

Any ideas on how this could be resolved would be much appreciated.任何关于如何解决这个问题的想法将不胜感激。

Many thanks,非常感谢,

Adam亚当

So I know this isn't really a satisfactory solution, but in trying to work out which file was causing me the issue, I created a new folder in my localhost root, and moved the files across from the location which wasn't working to the new location (which worked fine - this was the first test).所以我知道这并不是一个真正令人满意的解决方案,但在尝试找出导致我出现问题的文件时,我在本地主机根目录中创建了一个新文件夹,并将文件从无法正常工作的位置移动到新位置(效果很好——这是第一次测试)。 I ended up moving up all the files across and I didn't see the connection to local host error again.我最终移动了所有文件,但我没有再次看到与本地主机的连接错误。

Basically, I just created a new folder, moved the contents to it, and it worked.基本上,我只是创建了一个新文件夹,将内容移到其中,然后就可以了。

No idea why.不知道为什么。

Thanks谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 cURL无法在免费主机中连接,但在我的本地主机上可以正常工作 - cURL can't connect in a free host but works fine in my localhost 为什么我的本地主机无法重定向到其他页面? - Why is my local host unable to rediect to other pages? 为什么我的桌子没有出现? - Why isn't my table showing up? PHP将不会出现在我的本地主机中 - PHP won't appear in my local host 我的codeigniter webapp有问题,它在我的本地主机上工作正常但在实时服务器上没有 - I have problems with my codeigniter webapp it works fine on my local host but not on live server 自定义页面模板在本地主机上工作正常,但无法在线显示 - Custom page template works fine on local host but doesn't show up online 无法从本地网络上的 web 服务器访问 localhost - Can't access localhost from a web server on my local network 禁止在本地主机端口80的服务器! 打开本地主机时出错 - Forbidden Server at localhost Port 80!! error while opening local host 如何将我的 web 页面(在 USB 上)链接到我的本地主机 - How do I link my web pages (on usb) to my local host 为什么\\ n不能处理我的PHP脚本的一行,但是对其他所有脚本都没问题? - Why is \n not working on one line of my PHP script, but is fine on all the others?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM