等待本地主机...永无止境

等待本地主机...永无止境

问题描述:

我正在使用Laravel.在XAMPP的htdocs文件夹中,我的laravel根文件夹名称为sh. 我运行了以下代码

I am using Laravel. In XAMPP's htdocs folder my laravel root folder name is sh. I ran the following code

php artisan serve

发现

 Laravel development server started: <http://127.0.0.1:8000>

在我写的浏览器地址栏中

In Browser Address Bar I wrote

localhost:8000

现在

等待本地主机...

waiting for localhost...

永无止境.

我运行了这段代码

C:\>netstat -a

在很长的列表中我发现了

in a long list I found that

TCP    127.0.0.1:8000         ommited-PC:0            LISTENING
TCP    127.0.0.1:8000         ommited-PC:49674        ESTABLISHED

在我写的浏览器地址栏中

In Browser's address bar I wrote

http://localhost/sh/public/

该站点正确打开.

这是我的观察.我不知道为什么本地主机永远等待,我该怎么办.

This is my observation. I don't know why localhost waits for ever and what should I do.

已解决

这是因为Avast Antivirus. Avast错误地将 server.php 文件视为威胁.我在此链接后出现了异常

Solved

This was because of Avast Antivirus. By mistake Avast treated server.php file as a threat. I make an exception following this link

https://support.avast.com/en-ww /article/Antivirus-scan-exclusions

然后问题解决了.