随机生成自定义位数英文字符串
//生成随机英文字符串
function getEnglishStr($length)
{
$str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
$strLength = strlen($str)-1;
$finalStr = "";
for($j=0;$j<$length;$j++)
{
$finalStr .= substr($str,rand(0,$strLength),1);
}
return $finalStr;
}