0
我是一個ZF2乞討。我嘗試做一個路由器,當我在視圖中使用。我有這個錯誤: 致命錯誤:未知的異常'Zend \ Mvc \ Router \ Exception \ RuntimeException'帶有消息'Route with name'文件「找不到'Zend Framework 2路由器
你能幫我嗎?
這是我的代碼:
<?php
return array(
'controllers' => array(
'invokables' => array(
'Documents\Controller\Documents' => 'Documents\Controller\DocumentsController',
),
),
'router' => array(
'routes' => array(
'documents' => array(
'type' => 'segment',
'options' => array(
'route' => '/DocumentsController[/:action]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'__NAMESPACE__' => 'Documents\Controller',
'controller' => 'Documents\Controller\DocumentsController',
'action' => 'add',
),
)
)
)
)
);
感謝
您可以編輯您的問題,包括您使用的是產生這種錯誤的觀點的代碼? –