<html>
<head>
<title>展示驗證碼</title>
</head>
<body>
/*在模板html中,使用一個img標簽,請求一個可以生成圖像的SRC地址。 back/views/login.html 所請求的地址,還是一個控制器的動作方法!*/
/*在控制器中增加相應的動作
back/AdminController->captchaAction()
生成登錄表單驗證碼
public function captchaAction(){
//調用驗證碼工具類,生成圖像
$t_captcha= new Captcha();
$t_captcha->makeImage();
}
測試:需要將該動作,放到不需要校驗的特例中
*/
<table>
<tr>
<td align="right">
<img width="145" height="20" border="1" title="看不清?點擊更換驗證碼。" onclick="" alt="CAPTCHA" src="index.php?p=back&c=Admin&a=captcha">
</td>
</tr>
</table>
</body>
</html
