添加check_chinese_chars函数
This commit is contained in:
parent
c61727dff2
commit
e89b70c3fb
@ -119,3 +119,12 @@ if(!function_exists('is_time_cross')){
|
|||||||
return $checkCross(0, $timePeriods); // 从第一个时间段开始检查
|
return $checkCross(0, $timePeriods); // 从第一个时间段开始检查
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//写一个检测字符串是否包含中文的函数
|
||||||
|
if(!function_exists('check_chinese_chars')){
|
||||||
|
function check_chinese_chars($str){
|
||||||
|
return preg_match('/[\x{4e00}-\x{9fa5}]/u', $str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user