我workerman项目打包之后想让读取data.json文件里面的数据 if (Phar::running()) { echo "在包内运行 \n"; $filePath = '/../' . __FILE__ . '/data.json'; echo $filePath; } else { ...
//{"type": "to_msg","data": {"id": 2,"msg": "你在家吗"}} public static function onMessage($client_id, $data) { $result = json_decode($data, true); switch ($result['type']) { case 'game': ...