$router->addRoute('routeName', new Zend_Controller_Router_Route(
'test/:category/', array(
'module' => 'default',
'controller' => 'test',
'action' => ':category'
)
));
那是我目前的代码(见上文)。我现在如何通过给定的参数(通过 URL)调用操作?url 看起来像这样:domain.com/test/news/
现在我想在测试控制器中调用操作 newsAction()。使用上面的代码,我得到了错误:Action "category" does not exist and was not trapped in __call()