/var/www/hkosl.com/dashboard/webadmin/authcode.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
//隨機產生密碼
function randPassword()
{
//密碼長度
$len 20;
//o、l、0、1容易混淆,不加入產生字元內
$Range 'abcdefghijkmnpqrstuvwxyz23456789ABCDEFGHIJKLMNPQRSTUVWXYZ';
$StrLen strlen($Range);

$Passwd '';
for (
$i 0$i $len$i++) {
$Passwd .= $Range[rand() % $StrLen];
}

return 
$Passwd;
}

echo 
randPassword();
?>