【发布时间】:2013-11-01 07:30:56
【问题描述】:
我有一个模块是 OfficeModule。在 OfficeModule 我有两个 控制器 BranchController 和 BranchTypeController。和两个模型 分支模型和分支类型模型。还有两个视图文件。文件路径 是这样的:
protected\modules\office\controllers\branchController.php
protected\modules\office\controllers\branchtypeController.php
protected\modules\office\models\Branch.php
protected\modules\office\models\BranchType.php
我有一个模块文件:protected\modules\office\OfficeModule.php
当我从 url 调用时 projectname.test.com/office/branch 我想这样重定向: 项目名称.test.com/office/branchtype。现在我在写redirect() OfficeModule.php 内
public function beforeControllerAction($controller, $action){
$controller->redirect(array('../branchtype'));
}
但它不起作用并且无法重定向。任何人请帮助我。非常感谢!
【问题讨论】: