鲁鲁槟
- 鲁鲁槟 2016-03-04 已签到连续签到1天,获得了5个金钱
验证码不变需要改框架源码 vender\yiisoft\yii2\captcha\CaptchaAction.php getVerifyCode($regenerate = true)
验证码总是错误 应该是你的 $captchaAction 属性没有设置正确。
model 的rules方法
['captcha', 'captcha', 'message'=>'验证码错误', 'captchaAction'=>'user/captcha'],模板的地方也有个 captchaAction 选项。
<?php echo Captcha::widget(['name'=>'captchaimg','captchaAction'=>'login/captcha','imageOptions'=>['id'=>'captchaimg', 'title'=>'换一个', 'alt'=>'换一个', 'style'=>'cursor:pointer;'],'template'=>'{image}']); ?>为什么我在rules添加了 'message'=>'验证码错误', 'captchaAction'=>'user/captcha'会报错?
- 鲁鲁槟 赞了回答
貌似User中的规则rules里的验证码部分要指定下action位置,因为我看你是在modules用的,如:
['verifyCode', 'captcha', 'captchaAction'=>'admin/default/captcha', 'on' => 'login'], //验证码
删除了就不正常了………………
- 鲁鲁槟 2016-03-02 已签到连续签到3天,获得了15个金钱
能解释一下:index.php 前面前面的. 是什么意思?
- 鲁鲁槟 2016-03-01 已签到连续签到2天,获得了10个金钱
- 鲁鲁槟 2016-02-29 已签到连续签到1天,获得了5个金钱