Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Websocket握手错误_Php_Jquery_Websocket_Xampp - Fatal编程技术网

Php Websocket握手错误

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

我正在尝试在我的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 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);