//判断中英混合字符串长度
function lengths($Name,$Min=4,$Max=16){ $Name = preg_replace("/([x{4e00}-x{9fa5}])/iu",' ',$Name); if (mb_strlen($Name,'utf8') < $Min || mb_strlen($Name,'utf8') > $Max) { return false; } return true; }
//判断中英混合字符串长度
function lengths($Name,$Min=4,$Max=16){ $Name = preg_replace("/([x{4e00}-x{9fa5}])/iu",' ',$Name); if (mb_strlen($Name,'utf8') < $Min || mb_strlen($Name,'utf8') > $Max) { return false; } return true; }