zend框架2:无法渲染模板...解析器无法解析为实时服务器中的文件

时间:2014-06-25 11:38:38

标签: php zend-framework2

我在实时服务器中遇到问题。该网站在本地机器上非常好。但我在实时服务器中收到错误。这是实时服务器link

模块配置如下:

return array(
    'controllers' => array(
        'invokables' => array(

        'Admin\Controller\Admin' => 'Admin\Controller\AdminController',

    ),
),
'view_manager' => array(
    'template_path_stack' => array(
       'admin' => __DIR__ . '/../view',
    ),
),
'service_manager' => array(
    'aliases' => array(
        'Zend\Authentication\AuthenticationService' => 'my_auth_service',
    ),
    'invokables' => array(
        'my_auth_service' => 'Zend\Authentication\AuthenticationService',
    ),
),
// The following section is new and should be added to your file
'router' => array(
    'routes' => array(
        'admin' => array(
            'type' => 'segment',
            'options' => array(
                'route' => '/admin[/][:action][/:id]',
                'constraints' => array(
                    'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    'id' => '[0-9]+',
                ),
                'defaults' => array(
                    'controller' => 'Admin\Controller\Admin',
                    'action' => 'index',
                ),
            ),
        ), 
    ),
),

); 我正在检查几次但是一切都很好。任何人都可以猜到在实时服务器中获取此错误背后的错误是什么。错误是:

Zend\View\Renderer\PhpRenderer::render: Unable to render template "admin/admin/index"; resolver could not resolve to a file

如果有人知道我将如何解决这个问题,我将不胜感激。感谢您的关注。

0 个答案:

没有答案