首页 > Web开发 > 详细

json_decode时含有中文是解码问题(json_decode返回为null)

时间:2015-08-26 15:15:32      阅读:368      评论:0      收藏:0      [点我收藏+]
function myDecode($str){
    $str = substr(str_replace(‘\"‘,‘"‘,json_encode($str)),1,-1);
    return json_decode($str);  
}

 

json_decode时含有中文是解码问题(json_decode返回为null)

原文:http://www.cnblogs.com/share123/p/4760420.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!