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

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,请问这两种方法是否可行,麻烦详细解答下,万分感谢

大家讲道理
大家讲道理

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

全部回复(1)
迷茫

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

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板