开发环境:windows/Linux PHP7.3 Laravel5.8
实际结果:"{\"errcode\":47001,\"errmsg\":\"data format error rid: 6049b242-0a6de05f-0a73fb7a\"}"
结果截图:
代码截图:
其他情况:
如果 json_encode($params); 则会报错 InvalidArgumentException: Malformed UTF-8 characters, possibly incorrectly encoded in file
请求包
--------------------------32e95a04c68ea5ab
Content-Disposition: form-data; name="scene"
channel=123
--------------------------32e95a04c68ea5ab
Content-Disposition: form-data; name="page"
pages/index/index
--------------------------32e95a04c68ea5ab--
回应包
{"errcode":47001,"errmsg":"data format error rid: 6049b242-0a6de05f-0a73fb7a"}
参考一下:https://developers.weixin.qq.com/community/develop/doc/000a44ed5b81b09ce6282782751c00?_at=1615454025935
data 用jsonencode, 不要直接用表单