Blogger Information
Blog 43
fans 2
comment 2
visits 113117
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
使用swoole 提示 go() : async-io must be used in PHP CLI mode
朝游东海
Original
4291 people have browsed it

image.png

php 是cli

php think swoole 也能正常开启

然后查找各种资料,最后重新安装swoole.4.4.12;最后还是没有解决,最后的最后

发现了我在swoole.php中配置的访问端口是9503;但是自己在浏览器使用的域名端口却是80;

问题找到了,端口不一样,监听的9503,但是在80中使用go()那肯定会报错

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
2 comments
**山河亦逍遥 2022-09-27 10:56:13
看这个官网文档可以设置多端口监听即可 https://wiki.swoole.com/#/server/port?id=%e5%a4%9a%e7%ab%af%e5%8f%a3%e7%9b%91%e5%90%ac
2 floor
遗憾 2019-12-10 09:54:41
怎么解决啊 我也遇到了这个问题
1 floor
Author's latest blog post