使用iconv方法把中文编码转换为utf8
$value = iconv('gb2312','utf-8',$value);
json_encode($value);
输出结果正常:{“name”:”中文字符串”}
使用iconv方法把中文编码转换为utf8
$value = iconv('gb2312','utf-8',$value);
json_encode($value);
输出结果正常:{“name”:”中文字符串”}
转载于:https://www.cnblogs.com/tecliu/p/5383158.html