$str = '中'; if (preg_match('/^[\x{4e00}-\x{9fa5}]+$/u',$str)){ echo '中文'; } else { echo 'no'; } 转载于:https://www.cnblogs.com/pansidong/p/11457957.html