Php Websocket握手错误
我正在尝试在我的xampp安装中执行此操作 当我进入shell并键入php-qhtdocs\socket\server\startDeamon.php时,我得到了这个Php Websocket握手错误,php,jquery,websocket,xampp,Php,Jquery,Websocket,Xampp,我正在尝试在我的xampp安装中执行此操作 当我进入shell并键入php-qhtdocs\socket\server\startDeamon.php时,我得到了这个 2012-10-17 08:42:11 System: Socket Resource id #7 created. 2012-10-17 08:42:11 System: Socket bound to localhost:8000. 2012-10-17 08:42:11 System: Start listening on
2012-10-17 08:42:11 System: Socket Resource id #7 created.
2012-10-17 08:42:11 System: Socket bound to localhost:8000.
2012-10-17 08:42:11 System: Start listening on Socket.
Strict Standards: Only variables should be passed by reference in C:\xampp\htdoc
s\socket\server\socketWebSocket.class.php on line 35
Strict Standards: Only variables should be passed by reference in C:\xampp\htdoc
s\socket\server\socketWebSocket.class.php on line 35
2012-10-17 08:42:31 WebSocket: Resource id #8 disconnected!
Strict Standards: Only variables should be passed by reference in C:\xampp\htdoc
s\socket\server\socketWebSocket.class.php on line 35
Strict Standards: Only variables should be passed by reference in C:\xampp\htdoc
s\socket\server\socketWebSocket.class.php on line 35
可能是什么问题,代码是否旧
这是socketWebSocket.class.php的第35行
$num_sockets = socket_select($changed_sockets,$write=NULL,$exceptions=NULL,NULL);
尝试:
张贴代码的第35行。但我会重新考虑在websockets中使用nodejs+socket.io,而不是一个非常简单的基于PHP的实现。@ThiefMaster发布了代码。
$write=NULL;
$exceptions=NULL;
$num_sockets = socket_select($changed_sockets,$write,$exceptions,0);