这是我module.config
页面下方的代码
'router' => array(
'routes' => array(
'album' => array(
'type' => 'segment',
'options' => array(
'route' => '/photos[/:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'Photos\Controller\Photos',
'action' => 'index',
),
),
),
),
),
在我的控制器页面中
public function uploadAction()
{
//die('uploading page');
$this->layout('layout/index');
return array();
}
die works fine
我的前端页面代码是
这是我试图链接到任何其他页面的页面.....
`<?php echo $this->url('photos',array('action' => 'upload_done')); ?>`
我收到错误
Fatal error: Uncaught exception 'Zend\Mvc\Router\Exception\RuntimeException' with message 'Route with name "photos" not found' in