private function subStrs($page){
$len = $page*$this->pagelen;
$string = '';
for ($i=0;$i<$len;$i++){
if(ord(substr($this->file,$i,1))>0xa0){
$string.=substr($this->file,$i,2);//gbk截取2 (utf-8 截取三; i++执行两次)
$i++;
}else{
$string.=substr($this->file,$i,1);
}
}
}
PHP解决截取字符串乱码问题
最新推荐文章于 2021-03-23 20:39:47 发布