zl6592787 2016-01-28 13:26:04 2790次浏览 0条回复 0 0 0

view 页面代码

			<input type="text" placeholder="Security code"/> 
			<?php $this->widget('CCaptcha',array('showRefreshButton'=>false,'clickableImage'=>true,'imageOptions'=>array('alt'=>'点击换图','title'=>'点击换图','style'=>'cursor:pointer'))); ?>
		</div>

controller里面代码 public function actions()

{ 
        return array( 
                // captcha action renders the CAPTCHA image displayed on the contact page
                'captcha'=>array(
                        'class'=>'CCaptchaAction',
                        'backColor'=>0xFFFFFF, 
                        'maxLength'=>'5',       // 最多生成几个字符
                        'minLength'=>'5',       // 最少生成几个字符
                       	'height'=>'45',
                       	'width'=>'130'
                ), 
        ); 
}
public function accessRules(){
return array(
	array('allow',
        'actions'=>array('captcha'),
        'users'=>array('*'),
        ),
);

} 页面加载的时候 图片404 但是GD扩展已经打开 求指教!谢谢!

    没有找到数据。
您需要登录后才可以回复。登录 | 立即注册