网站模板中心

您现在的位置:首页>>织梦大学>>安装使用

织梦dedecms php常用函数

来源: 编辑:admin 发布时间:2019-11-07热度:60 ℃
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=...
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;
}


    1 : 汉字数字英文的混合字符串
    2 : 汉字数字的混合字符串
    3 : 汉字英文的混合字符串
    4 : 数字英文的混合字符串
    5 : 纯汉字
    6 : 纯数字
    7 : 纯英文
    8 : 其它
Pbootcms问题解决

请点击在线联系我们【点击咨询解决问题】   如果您有任何Pbootcms问题,我们将免费为您写解决教程!

    PB模板网:承接仿站业务,价格200元起!