php - yii中redirect的使用
大家讲道理
大家讲道理 2017-04-11 08:57:49
0
1
352

CException:

DatabaseSearch and its behaviors do not have a method or closure named "redirect".

error:在继承CComponent类的子类中我使用$this->redirect()时报错:
子类名 and its behaviors do not have a method or closure named "redirect"

注意

  • 该类和父类CComponent中并没有redirect方法的声明;

  • redirect在CControler与CHttpRequest之中都有被定义;

问题
我有两个想法,要么在该类中声明redirect方法,要么想方法调用CControler与CHttpRequest之中的redirect,请问这两种方法是否可行,麻烦详细解答下,万分感谢

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
迷茫

直接用CControler与CHttpRequest之中的redirect,有什么顾虑吗?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template