/**
* PHP 生成随机字符串,自定义长度
*
* @param
* @arrange 512-笔记网: www.www.jb51.cc
**/
function CreateRandomString($length)
{
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$password = "";
for ($i = 0; $i < $length; $i++) {
$password .= $chars[mt_rand(0,strlen($chars) - 1)];
}
return $password;
}
/*** 来自编程之家 jb51.cc(jb51.cc) ***/