1,json文件
2,php汉字转码文件 test.php
<? php
header("content-Type: text/html; charset=Utf-8");
set_time_limit(0); //设定一个程式所允许执行的秒数,0为最大限度
$file = "querys.json";
$content = file_get_contents($file);
echo $content."<br/>";
function replace_unicode_escape_sequence($match){
return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
}
$str = preg_replace_callback('/\u([0-9a-f]{4})/i', 'replace_unicode_escape_sequence', $content);
echo $str;
?>