/**
* 获取随机字符串
* @param $lenth
* @return string
*/
function getRandStr($lenth = 20)
{
$strData = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$randString = '';
$max = strlen($strData) - 1;
for($i = 1;$i <= $lenth;$i ++)
{
$n = rand(0,$max) ;
$randString .= substr($strData, $n,1);
}
return $randString;
}