我正在尝试从主应用程序引导文件将模型放入 Zend Registry:
public function _initRegistry()
{
$this->bootstrap('db');
$processmanager = new Systems_Model_Process();
Zend_Registry::set('processmanager', $processmanager);
}
出于某种原因,我遇到了以下错误:
Warning: include_once(Systems/Model/Process.php) [function.include-once]: failed to open stream: No such file or directory in /home/planetxg/public_html/dash/library/Zend/Loader.php on line 146
Warning: include_once() [function.include]: Failed opening 'Systems/Model/Process.php' for inclusion (include_path='/home/planetxg/public_html/dash/application/../library:/home/planetxg/public_html/dash/library:.:/usr/lib/php:/usr/local/lib/php') in /home/planetxg/public_html/dash/library/Zend/Loader.php on line 146
Fatal error: Class 'Systems_Model_Process' not found in /home/planetxg/public_html/dash/application/Bootstrap.php on line 20
有问题的模型位于以下位置:
application/modules/Systems/models/Process.php
是否有一些简单的东西我错过了或根本没有设置在这里?在控制器中正常调用模型时,我应该添加一切正常。
如果有帮助,这是我的主要 ini 块:
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.frontController.actionHelperPaths.Utilities = APPLICATION_PATH "/controllers/Helpers"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] =
autoloaderNamespaces[] = "CreativeLaunch_"
autoloaderNamespaces[] = "Systems_"