我经历过Zend Framework 1,我已经用这个框架构建了一些应用程序。
现在,我在尝试Zend Framework 2,但是我坚持使用url参数。
我已经设置了我的路由:
// Setup for router and routes
'Zend\Mvc\Router\RouteStack' => array(
'parameters' => array(
'routes' => array(
'default' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '/[:slug]',
'constraints' => array(
'slug' => '[a-zA-Z][a-zA-Z0-9_\/-]*'
),
'defaults' => array(
'controller' => 'Htmlsite\Controller\BootController',
'action' => 'index',
'slug' => 'home'
),
),
),
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'controller' => 'Htmlsite\Controller\BootController',
'action' => 'index',
),
),
),
),
),
),
你可以看到,我试图做一个变量的s。。
如何访问此变量?