欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

PHP產(chǎn)生隨機(jī)字符串函數(shù)

 更新時(shí)間:2006年12月06日 00:00:00   作者:  
<?php 

/**  
* 產(chǎn)生隨機(jī)字符串  
*  
* 產(chǎn)生一個(gè)指定長度的隨機(jī)字符串,并返回給用戶  
*  
* @access public  
* @param int $len 產(chǎn)生字符串的位數(shù)  
* @return string  
*/  
function randStr($len=6) {  
$chars='ABDEFGHJKLMNPQRSTVWXYabdefghijkmnpqrstvwxy23456789#%*'; // characters to build the password from  
mt_srand((double)microtime()*1000000*getmypid()); // seed the random number generater (must be done)  
$password='';  
while(strlen($password)<$len)  
$password.=substr($chars,(mt_rand()%strlen($chars)),1);  
return $password;  


?>

相關(guān)文章

最新評(píng)論