标签:char cti pre strlen har rand turn 字符 substr
function rand($len) { $chars=‘ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz‘; $string=time(); for(;$len>=1;$len--) { $position=rand()%strlen($chars); $position2=rand()%strlen($string); $string=substr_replace($string,substr($chars,$position,1),$position2,0); } return $string; }
标签:char cti pre strlen har rand turn 字符 substr
原文地址:http://www.cnblogs.com/wicub/p/6520385.html