0

我正在尝试在我的 xampp 安装上执行此操作。

http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/

当我进入 shell 并输入 php -q htdocs\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);
4

1 回答 1

1

尝试:

$write=NULL;
$exceptions=NULL;
$num_sockets = socket_select($changed_sockets,$write,$exceptions,0);
于 2012-10-17T07:19:33.660 回答