织梦dedecms常用php函数介绍

织梦dedecms常用函数总结,常用函数/类参考,织梦(DedeCMS)系统内置常用函数列表及用法,织梦php函数设置,下面小编来给大家介绍一下,一起来了解一下吧!

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 : 其它

 

以上就是织梦dedecms常用php函数介绍的介绍,希望大家喜欢!

更多教程关注FF推源码网。

提供最优质的资源集合

立即查看 了解详情