socketIO 主动推送时候 $_GET 获取不到值

伊伦哲罗
$io->on('workerStart', function()use($io) {
            $inner_http_worker = new Worker('http://0.0.0.0:5880');
            $inner_http_worker->onMessage = function($http_connection, $data)use($io){
                if(!isset($_GET['msg'])) {
                    $rb=input('param.');
                    $rc=input('');
                    return $http_connection->send('fail, $_GET["msg"] not found!!rb:');
                }
                $io->emit('receive_message', $_GET['msg']);
                $http_connection->send('ok');
            };
            $inner_http_worker->listen();
        });

不论是 $_GET['msg'] 还是 $_post['msg'] 都获取不到值 ??

有什么方式方法可以把URL 打印出来……

阅读 886
1个回答

six

workerman4.x 用$data->get(‘msg’)取值