function includeGbk($str){ $pattern = '/[^\x00-\x80]/'; if(preg_match($pattern, $str)) { return true; //包含中文 } return false;}