YII的验证码想要动态刷新,不是很方便,正好自己用各种找办法,终于解决了,可还是特别麻烦终于找到简单有效的办法了
不多说直接码代码,大家一看就明白,希望能帮到遇到同样问题的道友
public function actionTestCaptcha(){
$captcha= new CCaptchaAction($this,'captcha');
Yii::app()->session['captcha'] = $captcha->fixedVerifyCode = substr(md5(time()), 11, 4);
$captcha->transparent = true;
$captcha->maxLength = 4;
$captcha->minLength = 4;
$captcha->height = 35;
$captcha->width = 80;
$captcha->run();
}