我在验证码验证的查看页面上有一个代码。 没有图像显示在这里。 我还尝试对CCaptcha进行需求检查,并将代码放在控制器上以进行操作重定向。 但是没有什么可以改善的。
我的观点
<?php
if(CCaptcha::checkRequirements()){
$this->widget('CCaptcha'); ?>
<?php echo $form->textField($model,'verifyCode'); ?>
</div>
<div class="hint">Please enter the letters as they are shown in the image above.
<br/>Letters are not case-sensitive.</div>
<?php echo $form->error($model,'verifyCode');
}
?>
在我的控制器中
public function actions()
{
return array(
// captcha action renders the CAPTCHA image displayed on the contact page
'captcha'=>array(
'class'=>'CCaptchaAction',
'backColor'=>0xFFFFFF,
),
);
}
这只是我的看法。 没有图像显示
谢谢@gultomicro
public function accessRules(){'actions'=>array('create','captcha'), 'users'=>array('*')}
给你答案