摘要:
1 // 防止json中文转码2 function jsonEncodeWithCN($data) {3 return preg_replace("/\\\u([0-9a-f]{4})/ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '$1'))", json_encode($data));4 }5 6 $arr = array('a'=>'测试', b=>'hello');7 8 echo j 阅读全文
posted @ 2014-04-10 13:00
辰阳
阅读(627)
评论(2)
推荐(0)

浙公网安备 33010602011771号