复制代码 代码如下:
function randStr($len)
{
$chars=’ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz’; // characters to build the password from
$string=”;
for(;$len>=1;$len–)
{
$position=rand()%str
本文来源gaodai.ma#com搞##代!^码@网*
搞gaodaima代码
len($chars);
$string.=substr($chars,$position,1);
}
return $string;
}
echo randStr(10).”
“;