获取随机的字符串,用于token,EncodingAESKey等的生成
function get_rand_char($length = 6) {
$str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz";
$strLength = 61;
for($i = 0; $i < $length; $i ++) {
$res .= $str [rand ( 0, $strLength )];
}
return $res;
}