workerman如何接收json数据

万象初新

截图
截图

2237 4 0
4个回答

万象初新

截图

  • 暂无评论
xiuwang
$data = json_decode($buffer->rawBody()); 

试下

万象初新

截图

  • 暂无评论
xiuwang

直接打印 $buffer->rawBody() 看下吧

  • 万象初新 2020-07-14

    厉害厉害 打印出json数据了!!非常感谢!

  • 万象初新 2020-07-14

    {
    "Name": "heartbeatRequest",
    "TimeStamp": 1594713882,
    "Data": {
    "DeviceInfo": {
    "DeviceId": "10149445",
    "DeviceUUID": "umettqtdmsdy",
    "DeviceMac": "00:11:04:02:28:a4",
    "DeviceIp": "192_168_101_88",
    "WebVersion": "7_18_1_KD3_1_14_8_5",
    "CoreVersion": "17_17_1_40",
    "VersionDate": "Jun_19_2020_09:40:43",
    "ChannelNo": 0
    },
    "HTTPVersion": "V2_0_1",
    "HTTPDate": "2020-04-02",
    "HeartbeatCount": 0,
    "CaptureCount": 0
    }

年代过于久远,无法发表回答
×
🔝