php websocket 遇到的坑

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39307131/article/details/82152873

我第一次用websocket  其中让我最困或的地方是 

socket_bind():无法绑定地址[99] (socket_bind(): unable to bind address [99] 

PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in sockets_test.php on line 45

这个错误: 网上查了很多都是说ip地址不对

我当时用的是公网ip 不能用

只有在127.0.0.1 或 0.0.0.0 的时候才能连接上

其中127.0.0.1 只能内部访问

设置成 0.0.0.0 外部也能访问到

不知道你们有没有遇到过这个问题!!!

猜你喜欢

转载自blog.csdn.net/qq_39307131/article/details/82152873