我試圖把模型分成Zend註冊從主應用程序引導文件中找到的模型:Zend的,不能從引導
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_"
您是否指定了模塊目錄? – Fender
你的意思是在application.ini中?如果是這樣,是的 - 我會在這裏添加 – BenOfTheNorth
看看[這裏](http://stackoverflow.com/questions/2542892/zend-framework-modules-cant-find-load-models) – bitWorking