人只需不取得标的目标,就不会取得自己。有没有人爱,我们也要努力做一个可爱的人。不埋怨谁,不嘲笑谁,也不羡慕谁,阳光下灿烂,风雨中奔跑,做自己的梦,走自己的路。
function checkStr($str){
$output='';
$a=ereg('['.chr(0xa1).'-'.chr(0xff).']', $str);
$b=ereg('[0-9]', $str);
$c=ereg('[a-zA-Z]', $str);
if($a && $b && $c){ $output='1';}
elseif($a && $b && !$c){ $output='2';}
elseif($a && !$b && $c){ $output='3';}
elseif(!$a && $b && $c){ $output='4';}
elseif($a && !$b && !$c){ $output='5';}
elseif(!$a && $b && !$c){ $output='6';}
elseif(!$a && !$b && $c){ $output='7';}
else{ $output = 8;}
return $output;
}
$output='';
$a=ereg('['.chr(0xa1).'-'.chr(0xff).']', $str);
$b=ereg('[0-9]', $str);
$c=ereg('[a-zA-Z]', $str);
if($a && $b && $c){ $output='1';}
elseif($a && $b && !$c){ $output='2';}
elseif($a && !$b && $c){ $output='3';}
elseif(!$a && $b && $c){ $output='4';}
elseif($a && !$b && !$c){ $output='5';}
elseif(!$a && $b && !$c){ $output='6';}
elseif(!$a && !$b && $c){ $output='7';}
else{ $output = 8;}
return $output;
}
1 : 汉字数字英文的混合字符串
2 : 汉字数字的混合字符串
3 : 汉字英文的混合字符串
4 : 数字英文的混合字符串
5 : 纯汉字
6 : 纯数字
7 : 纯英文
8 : 其它
2 : 汉字数字的混合字符串
3 : 汉字英文的混合字符串
4 : 数字英文的混合字符串
5 : 纯汉字
6 : 纯数字
7 : 纯英文
8 : 其它
本文织梦dedecms php常用函数-跟版网到此结束。人若软弱就是自己最大的敌人。小编再次感谢大家对我们的支持!