diff --git a/app/functions.php b/app/functions.php index 1eb86a0..5455c4c 100644 --- a/app/functions.php +++ b/app/functions.php @@ -119,3 +119,12 @@ if(!function_exists('is_time_cross')){ return $checkCross(0, $timePeriods); // 从第一个时间段开始检查 } } + +//写一个检测字符串是否包含中文的函数 +if(!function_exists('check_chinese_chars')){ + function check_chinese_chars($str){ + return preg_match('/[\x{4e00}-\x{9fa5}]/u', $str); + } +} + +