New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何让server.php接收get参数 #6
Comments
server.php文件不是用浏览器访问的。是在命令行里面运行的。 客户端给服务端发送数时据客户端直接emit即可,不用get传递。 phpsocket.io使用方法参考docs目录的手册 https://github.com/walkor/phpsocket.io/tree/master/docs/zh |
我想说,其实是有这种需求的。。。 |
PHPSocket.IO里面可以这样获得get参数 $io->on('connection', function($socket)use($io){
$io->emit('chat message', $socket->request->_query['key']);
}); |
上面说过了,server.php 不是用浏览器来访问的,是命令行运行的 |
那就是说,不能实现我说的那种需求? |
获取get参数能实现,上面已经给了方法。 |
我想在server.php里获取 又想通过浏览器访问server.php |
你不了解phpsocket.io的运行机制,我是没办法和你沟通的。 |
我想让server.php接收get参数,然后传给客户端,不知道如何操作。下面这种方式是不行的
The text was updated successfully, but these errors were encountered: