static function ischinese($s){ $allen = preg_match("/^[^/x80-/xff]+$/", $s); //判断是否是英文 - $allcn = preg_match("/^[".chr(0xa1)."-".chr(0xff)."]+$/",$s); //判断是否是中文
- if($allen){
- return 'allen';
- }else{
- if($allcn){
- return 'allcn';
- }else{
- return 'encn';
- }
- }
- }
- ?> //by bbs.it-home.org
|