欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

json_decode($str,true)的结果为null

程序员文章站 2022-07-05 14:33:44
//$result为传进来的json值 $result = $this->params['auth_result']; //html_entity_decode进行HTML 实体转换为字符 //stripslashes() 函数的作用是删除反斜杠 $info = stripslashes(html_... ......
        //$result为传进来的json值
        $result = $this->params['auth_result'];
       //html_entity_decode进行html 实体转换为字符
       //stripslashes() 函数的作用是删除反斜杠
        $info = stripslashes(html_entity_decode($result));
        $resultcode = json_decode($info,true);