ZF3升级无法呈现模板

时间:2017-07-24 12:04:57

标签: php zend-framework zend-framework2 zend-framework3

我正在从ZF2升级到ZF3,到目前为止,除了下面的问题,当我想加载我的应用程序时,这一点非常顺利:

ERROR Zend\View\Renderer\PhpRenderer::render: Unable to render template "error"; resolver could not resolve to a file

#0 /home/myproject/vendor/zendframework/zend-view/src/View.php(207): Zend\View\Renderer\PhpRenderer->render()
#1 /home/myproject/vendor/zendframework/zend-view/src/View.php(236): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#2 /home/myproject/vendor/zendframework/zend-view/src/View.php(200): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))
#3 /home/myproject/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(105): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#4 /home/myproject/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#5 /home/myproject/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent))
#6 /home/myproject/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(123): Zend\EventManager\EventManager->triggerEvent(Object(Zend\Mvc\MvcEvent))
#7 /home/myproject/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#8 /home/myproject/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent))
#9 /home/myproject/vendor/zendframework/zend-mvc/src/Application.php(367): Zend\EventManager\EventManager->triggerEvent(Object(Zend\Mvc\MvcEvent))
#10 /home/myproject/vendor/zendframework/zend-mvc/src/Application.php(326): Zend\Mvc\Application->completeRequest(Object(Zend\Mvc\MvcEvent))
#11 /home/myproject/public/index.php(52): Zend\Mvc\Application->run()
#12 {main}

我认为问题是我没有将Zend \ View加载到我的模块中但是它确实加载了使用composer autoload,当我再次将它添加到我的模块时我得到它无法启动,这可能是因为它已经具有

回到我的问题,getConfig()改变如下所述:

https://docs.zendframework.com/tutorials/migration/to-v3/application/

因为我在那里看了看,到目前为止,这里唯一的话题对我没有帮助。

0 个答案:

没有答案