We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
类中自定义了一个json_encode方法,避免在内容中有中文时会被转义成unicode,导致收到的消息是乱码(unicode),其实php中可以向json_encode方法传递第二个参数的值为 JSON_UNESCAPED_UNICODE,这个时候中文不会转义
json_encode(['index' => '中文'], JSON_UNESCAPED_UNICODE); // 输出: {"index": "中文"}
The text was updated successfully, but these errors were encountered:
类里边的json函数无法正确处理\n,在发送字段里包含\n的模板消息时无法正确被微信识别。
我简单改了一下,还没充分测试。 static function json_encode($arr) { return json_encode($arr, JSON_UNESCAPED_UNICODE); }
Sorry, something went wrong.
No branches or pull requests
类中自定义了一个json_encode方法,避免在内容中有中文时会被转义成unicode,导致收到的消息是乱码(unicode),其实php中可以向json_encode方法传递第二个参数的值为 JSON_UNESCAPED_UNICODE,这个时候中文不会转义
The text was updated successfully, but these errors were encountered: