thinkPHP6报错:Failed to listen on 0.0.0.0:8000 (reason: һַȨ޲“

1、在命令行执行命令”php think run“时,回车后,反馈显示
ThinkPHP Development server is started On http://127.0.0.1:8080/
You can exit with CTRL-C
Document root is: D:\php\thinkPHP_6\public
[Sun Jan 10 21:51:54 2021]] Failed to listen on 0.0.0.0:8000 (reason: һַȨ޲

2、此时,说明tp6默认是使用8000端口,但我本机的8000端口被其它进程占用了,我们可以修改tp6的访问端口,执行如下命令,将端口改为8080或者其他的未被占用的端口:

php think run -p 8080

3、命令执行后返回如下内容,就说明端口修改成功,此时再打开浏览器输入"http:/localhost:8080,就能正常访问tp6的页面了
ThinkPHP Development server is started On http://127.0.0.1:8080/
You can exit with CTRL-C
Document root is: D:\php\thinkPHP_6\public
[Sun Jan 10 21:59:57 2021]] 127.0.0.1:63685 [200]: /
[Sun Jan 10 22:01:14 2021] 127.0.0.1:63691 [200]: /favicon.ico

你可能感兴趣的:(PHP,thinkPHP,php,thinkphp)