json_decode($str,true)的结果为null
//$result为传进来的json值 $result = $this->params['auth_result']; //html_entity_decode进行HTML 实体转换为字符 //stripslashes() 函数的作用是删除反斜杠 $info = stripslashes(html_entity_decode($result)); $resultCode = json_decode($info,true);
ps:关注一下本人公众号,每周都有新更新哦!