在本地能正常运行,在阿里云服务器上不行。前端代码显示连接成功。
在后端推动代码那里没有反应。
以下是相关代码截图,如果你有时间看到,麻烦帮我看看,万分感谢。
后端代码:
```php
<?'ok' : 'fail');
};
$inner_text_worker->listen();
};
// 当有客户端发来消息时执行的回调函数
$worker->onMessage =var ws = new WebSocket("ws://127.0.0.1:8088");
if(typeof(ws) == 'undefined'){
alert('你的浏览器不支持bind_id'+bind_id);
//绑定user_id
ws.send(bind_id);
}
};
//数据接收监听,接收服务器推送过来的信息,返回的数据给msg,然后进行显示
ws.onmessage = function (msg){
console.log('onmessage');
console.log