$str=file_get_contents(C("WEB_NAME")."/Public/Uploads/testdata.json"); //去除换行符 $str=str_replace(PHP_EOL,'',$str); $d=json_decode($str,true); if(!$d){ $this->sendmsg("","请注意原json格式是否正确",1); } return $d;
$str=file_get_contents(C("WEB_NAME")."/Public/Uploads/testdata.json"); //去除换行符 $str=str_replace(PHP_EOL,'',$str); $d=json_decode($str,true); if(!$d){ $this->sendmsg("","请注意原json格式是否正确",1); } return $d;