php代码
function str_rand($length)//随机字符,参数是长度
{
if(empty($length))
return NULL;
$a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
$rand_str = '';
for($i=0;$i<$length;++$i)
{
$rand_str .= $a[rand(0,61)];
}
return $rand_str;
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn