/**
* 生成指定长度随机字符串
* @param $len
* @return null|string
*/
function randStr($len)
{
$randStr = null;
$strPol = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz";
$max = strlen($strPol) - 1;
for ($i = 0; $i < $len; $i++) {
$randStr .= $strPol[rand(0, $max)];
}
return $randStr;
}