PHP 设置 json_encode 不转义中文

PHP JSON About 135 words

问题

PHP生成JSON的时候,会转义为\u开头的UNICODE数据。

解决

json_encode中加入一个参数JSON_UNESCAPED_UNICODE,必须PHP5.4+

json_encode($data, JSON_UNESCAPED_UNICODE); 
Views: 2,335 · Posted: 2019-04-08

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh