function MakePass($length)
{
$possible = "0123456789!@#$%^&*()_+".
"abcdefghijklmnopqrstuvwxyz".
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$str = "";
while(strlen($str) < $length)
{
$str .= substr($possible, (rand() % strlen($possible)), 1);
}
return($str);
}
?>
文章来源于领测软件测试网 https://www.ltesting.net/