{
if (is_null($chars)) {
$ chars = " abcdefghijklmnopqrstuvwxyz ";
}
mt _ srand(10000000 *(double)microtime());//mt_srand
for ($i = 0,$str = ' ',$ LC = strlen($ chars)-1;$ i & lt$ len$i++) {
$str。= $chars[mt_rand(0,$ LC)];
返回$ str