深圳全飞鸿

标题: json_decode失败的问题 [打印本页]

作者: zhgc    时间: 2022-11-15 15:16
标题: json_decode失败的问题


$fn="D:\\aa\\ww.txt";
$jsonstr=file_get_contents($fn);
for ($i = 0; $i <= 31; ++$i) {
        $jsonstr = str_replace(chr($i), "", $jsonstr);
}
        $datas=json_decode($jsonstr, true);
        if(!$datas){
                $ret=json_last_error();
                echo "json_last_error={$ret}!";
        }
       
        echo $datas[0]["ID"];




\t会失败






欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2