1
This commit is contained in:
@@ -112,6 +112,20 @@ function object_to_array($obj) {
|
||||
return $obj;
|
||||
}
|
||||
|
||||
function get_str(){
|
||||
|
||||
$length = 32;
|
||||
$str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
||||
$len = strlen($str)-1;
|
||||
$randstr = '';
|
||||
for ($i=0;$i<$length;$i++) {
|
||||
$num=mt_rand(0,$len);
|
||||
$randstr .= $str[$num];
|
||||
}
|
||||
return md5($randstr.time());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成文章sn号
|
||||
* @return type
|
||||
|
||||
Reference in New Issue
Block a user