【例
(
function randStr($len=
switch($format) {
case
$chars=
Zabcdefghijklmnopqrstuvwxyz
break;
case
$chars=
bcdefghijklmnopqrstuvwxyz
break;
case
$chars=
break;
default :
$chars=
abcdefghijklmnopqrstuvwxyz
break;
}
$string=
//從字符源中隨機取得字符
while(strlen($string)<$len) {
$string
}
return $string;
}
(
//生成字符的個數
$randval = randStr(
//將驗證碼繪入圖片
imagestring($im
(
<label for=
<input class=
maxLength=
<img src=authimg
返回目錄
編輯推薦
Java Web開發詳解
ASP
ASP
ASP
From:http://tw.wingwit.com/Article/program/PHP/201311/21555.html