ybaidukuai 发表于 2017-3-21 08:34:59

php json_encode 中文null

php json_encode 中文null
更多内容请看:yoewan分享,Flash教程,JSFL教程
转载自:http://www.yoewan.com/php-the-json_encode-chinese-null.html

今天在使用php json_encode的时候发现中文都是null,后来上网查询了下,在使用json_encode的时候,中文先要编一下码,否则会为null,代码如下

//中文编码
$data=iconv('gbk','utf-8','yoewan分享');

标签:yoewan.com,php json_encode 中文null
页: [1]
查看完整版本: php json_encode 中文null