摘要: function hasChinese($str) { return preg_match('/[\x{4e00}-\x{9fa5}]/u', $str);} // 使用示例$string = "Hello 你好";if (hasChinese($string)) { echo "字符串包含中文"; 阅读全文
posted @ 2025-09-12 04:44 幽暗天琴 阅读(5) 评论(0) 推荐(0)