加载流程是admin.php作为入口文件,index控制器继承ba
class IndexAction extends BaseAction {
public function index() {
//indexAction.class.php
}
}
class BaseAction extends Action {
//BaseAction.class.php
public function _initialize() {
if (!$this->isLogin()) {
$this->redirect('Home/Login/index');
}
}Login控制器的代码class LoginAction extends Action {
/**
* 显示登录页面
*/
public function index() {
if (!empty($_SESSION[C('SESSION_ADMIN_NAME')]) && !empty($_SESSION[C('SESSION_ADMIN_ID')]) && strtolower(ACTION_NAME) != 'logout') {
$this->redirect("Index/index");
}
$this->display('login');
}理论上loginAction不继承ba目录结构是:

尝试了修改pathinfo模式,看了nginx的重写模式都不行
最佳答案