日期:2011-04-17  浏览次数:20375 次


<?
function MakePass($length)
{
$possible = "0123456789!@#$%^&*()_+".
"abcdefghijklmnopqrstuvwxyz".
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$str = "";
while(strlen($str) < $length)
{
$str .= substr($possible, (rand() % strlen($possible)), 1);
}
return($str);
}
?>