日期:2014-05-17 浏览次数:20457 次
(1)数据库类型MyISAM,表字符集utf8_general_ci,字段kw字符集 utf8_general_ci
(2)PHP版本:PHP Version 5.2.17,CGI/fast CGI
(3)System Linux sasin 2.6.32.36-hardened #9 SMP Tue Mar 29 09:29:20 PDT 2011 x86_64
(4)手机相关信息:
HTTP_ACCEPT_ENCODING = gzip
HTTP_ACCEPT_LANGUAGE = zh-CN
HTTP_USER_AGENT = Mozilla/5.0 (Linux; U; Android 2.3; zh-cn;HTC Build/GRJ90) UC AppleWebKit/534.31 (KHTML, like Gecko) Mobile Safari/534.31
HTTP_ACCEPT = application/xml,application/vnd.wap.xhtml+xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,text/vnd.wap.wml;q=0.6,*/*;q=0.5,UC/145,plugin/1
REMOTE_PORT = 49279
REQUEST_METHOD = GET
(5)手机浏览器 UC:8.7.2.214 Android
function is_utf8($str) {
$c=0; $b=0;
$bits=0;
$len=strlen($str);
for($i=0; $i<$len; $i++){
$c=ord($str[$i]);
if($c > 128){
if(($c >= 254)) return false;
elseif($c >= 252) $bits=6;
elseif($c >= 248) $bits=5;
elseif($c >= 240) $bits=4;
elseif($c >= 224) $bits=3;
elseif($c >= 192) $bits=2;
else return false;
if(($i+$bits) > $len) return false;
while($bits > 1){
$i++;
$b=ord($str[$i]);
if($b < 128 || $b > 191) return false;
$bits--;
}
}
}
return true;
}