對不起,我是ZF的新手。我需要將我的代碼從MAMP生產服務器移到LAMP Live Server。Zend框架遷移到Live服務器
當我在本地主機上工作的代碼都工作正常。但是,當我將其上載到實時服務器時,有60%的模塊反映了此錯誤。
Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'layout.phtml' not found in path (/home/lifeoppc/public_html/application/layouts/:/home/lifeoppc/public_html/application/modules/default/views/scripts/:./views/scripts/)' in /home/lifeoppc/public_html/public/Zend/View/Abstract.php:988 Stack trace: #0 /home/lifeoppc/public_html/public/Zend/View/Abstract.php(884): Zend_View_Abstract->_script('layout.phtml') #1 /home/lifeoppc/public_html/public/Zend/Layout.php(796): Zend_View_Abstract->render('layout.phtml') #2 /home/lifeoppc/public_html/public/Zend/Layout/Controller/Plugin/Layout.php(143): Zend_Layout->render() #3 /home/lifeoppc/public_html/public/Zend/Controller/Plugin/Broker.php(333): Zend_Layout_Controller_Plugin_Layout->postDispatch(Object(Zend_Controller_Request_Http)) #4 /home/lifeoppc/public_html/public/Zend/Controller/Front.php(965): Zend_Controller_Plugin_Broker->postDispatch(Object(Zend_Controller_Request_Http)) #5 /home/lifeoppc/public_html/public/Zend/Application/Bootstrap/Bootstrap.php(9 in /home/lifeoppc/public_html/public/Zend/Controller/Plugin/Broker.php on line 336
我真的很需要幫助!網站是活會在週一,我真的絕望了,現在=(
你在你的application.ini有哪些?你viewPaths很可能不是比你的MAMP服務器上的那些相同。 – Liyali 2012-04-14 03:59:15
嗨Liyali, [製作] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH 「/../library」 引導.path = APPLICATION_PATH「/ Boot strap.php」 bootstrap.class = 「自舉」 appnamespace = 「應用程序」 resources.frontController.controllerDirectory = APPLICATION_PATH 「/控制器」 resources.frontController.params.displayExceptions = 0 autoloaderNamespaces [] = 「LifeOpp_」 resources.frontController.moduleDirectory = APPLICATION_PATH 「/模塊」 resources.modules [] = 「」 resources.layout.layoutpath = APPLICATION_PATH 「/佈局」 – swfong 2012-04-14 04:16:28
i點到每個控制器的init使用此代碼的五個不同的佈局( ) $ this - > _ helper-> layout-> setLayout('employee-layout'); – swfong 2012-04-14 04:17:05