class Events { public static function onWebSocketConnect($client_id, $data) { $_SESSION['ip'] = your_get_ip_func($data); } public static function onMessage($client_id, $data) { var_export($_SESSION['ip']); } }
ok 谢谢
ok 谢谢