2015-06-24 15:31:42 3359次浏览 1条回答 0 悬赏 0 金钱

整合了smarty3,想过这种(当然不行的

function init() {
    parent::init();
    $this->captobj = new CaptchaAction(yii::$app->controller->id, $this);
    $this->_params['captcha_session_code'] = $this->captobj->getVerifyCode();
}

这种可以,不过id随便取似乎不太好。。。

function init() {
    parent::init();
    $this->captobj = new CaptchaAction(1111, $this);
    $this->_params['captcha_session_code'] = $this->captobj->getVerifyCode();
}

最佳答案

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

kestrel

注册时间:2015-05-22
最后登录:2021-11-20
在线时长:3小时12分
  • 粉丝1
  • 金钱55
  • 威望10
  • 积分185

热门问题