Posted in PHP onMarch 26, 2009
function randStr($len) { $chars='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; // characters to build the password from $string=''; for(;$len>=1;$len--) { $position=rand()%strlen($chars); $string.=substr($chars,$position,1); } return $string; } echo randStr(10)."<br>";
php 随机生成10位字符代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@