"템플릿을 렌더링 할 수 없습니다."라는 질문과 답변이 많지만 제 질문에 이상이 있습니다. 내가 URL을 열 때젠드 프레임 워크 2 : 템플릿을 렌더링 할 수 없습니다. -
: 나는이 usermanager
에 user-manager
이름을 바꾼로 완전히 괜찮 Zend\View\Renderer\PhpRenderer::render: Unable to render template "users/user-manager/index"; resolver could not resolve to a file
: http://localhost:8080/users/usermanager/index
을 나는이 오류가 발생합니다. 내 전체 코드를 덮어 더 이상 user-manager
에 대한 참조를 찾을 수 없습니다. 젠드가 왜 아직도 그것을 찾고 있습니까?
내 module.config.php : 어떤 도움
<?php
namespace Users;
return array (
'controllers' => array (
'invokables' => array (
'Users\Controller\Index' => 'Users\Controller\IndexController',
'Users\Controller\Register' => 'Users\Controller\RegisterController',
'Users\Controller\Login' => 'Users\Controller\LoginController',
'Users\Controller\UserManager' => 'Users\Controller\UserManagerController'
)
),
'router' => array (
'routes' => array (
'users' => array (
'type' => 'Literal',
'options' => array (
'route' => '/users',
'defaults' => array (
'__NAMESPACE__' => 'Users\Controller',
'controller' => 'Index',
'action' => 'index'
)
),
'may_terminate' => true,
'child_routes' => array (
'default' => array (
'type' => 'Segment',
'options' => array (
'route' => '/[:controller[/:action]]',
'constraints' => array (
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*'
),
'defaults' => array()
)
)
)
),
'usermanager' => array (
'type' => 'Segment',
'options' => array (
'route' => '/usermanager[/:action[/:id]]',
'constraints' => array (
'action' => '[a-zA-z][a-zA-z0-0_-]*',
'id' => '[a-zA-Z0-9_-]*'
),
'defaults' => array (
'controller' => 'Users\Controller\UserManager',
'action' => 'index'
)
)
)
)
),
'service_manager' => array (
'abstract_factories' => array (
'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
'Zend\Log\LoggerAbstractServiceFactory'
),
'aliases' => array (
'translator' => 'MvcTranslator'
)
),
'translator' => array (
'translation_file_patterns' => array (
array (
'type' => 'gettext',
'base_dir' => __DIR__ . '/../language',
'pattern' => '%s.mo',
'text_domain' => __NAMESPACE__
)
)
),
'view_manager' => array (
'template_path_stack' => array (
'users' => __DIR__ . '/../view'
)
)
);
감사합니다!
+1. 또는보기 폴더를'user-manager'로 유지하십시오. –
감사! 나는 내 자신으로 이것을 결코 발견하지 못했을 것이다. – AlexWerz