尝试在 Zend Framework 应用程序中使用模块化布局时出现以下错误:
未定义索引:第 385 行 C:\PHP\includes\Zend\Controller\Dispatcher\Standard.php 中的身份验证
以下代码在此错误之前运行:
if (!$this->_acl->isAllowed($role, $resource, $privilege)) {
$request->setModuleName('authentication');
$request->setControllerName('auth');
$request->setActionName('login');
$request->setDispatched(false);
}
在我的引导程序中,我有:
$frontController
->setParam('environment', $this->environment)
->setControllerDirectory(ROOT_DIR . '/controllers')
->addModuleDirectory(ROOT_DIR . '/modules');
我的目录结构是:
/ application
/ controllers
/ models
/ views
/ library
/ modules
/ Authentication
/ controllers
AuthController.php
任何想法为什么这不起作用?