function randstr($len=6){
$chars='abcdefghijklmnopqrstuvwxyz0123456789';
#characters to build the password from
mt_srand((double)microtime()*1000000*getmypid());
#seed the random number generater (must be done)
$password='';
while(strlen($password) $password.=substr($chars,(mt_rand()%strlen($chars)),1);
return $password;
}
$salt = randstr();
Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号