修改核心类CcaptchaAction 源代码稍微有小问题,需要修改
在视图中:
(1)普通写法:
<?php $this->widget('CCaptcha')?>
(2)带有点击刷新:
<?php $this-
>widget('CCaptcha',array('showRefreshButton'=>false,'clickableI
mage'=>true,'imageOptions'=>array('alt'=>'点击换图','title'=>'点
击换图','style'=>'cursor:pointer'))); ?>
http://www.php100.com/manual/yii/CCaptcha.html
showRefreshButton boolean
是否显示用来刷新验证码图片的按钮。点击按钮时会刷新 验证码图片。默认为true。
clickableImage boolean
是否允许通过点击验证码图片刷新验证码字符。 默认为false。注意:如果你想要设置这个属性为true,你应该 设置showRefreshButton为false,因为他们提供相同的功能。 为了增强访问性,你应该设置imageOptions以通知用户, 图片是可以点击的。