标签:char [1] col sci bom头 har bom blog style
1 //取前三个字符 并转化为ASCII 判断是否为BOM文件 2 3 $charset[1] = substr($result, 0, 1); 4 $charset[2] = substr($result, 1, 1); 5 $charset[3] = substr($result, 2, 1); 6 if (ord($charset[1]) == 239 && ord($charset[2]) == 187 && 7 ord($charset[3]) == 191) { 8 $result = substr($result, 3); 9 } 10 11 $json_result = json_decode($result,true);
标签:char [1] col sci bom头 har bom blog style
原文地址:http://www.cnblogs.com/alin-qu/p/7803273.html