我的路线设置:
Zend_Controller_Front::getInstance()
->getRouter()
->addRoute('view', new Zend_Controller_Router_Route('controller/action/:name'))
我在视图中的链接:
$this->url(array("name" => "John"), "view", TRUE);
// returns "controller/action/John" as should
现在,当我在时controller/action/John
,如何获取name
from URL?我试过了
$this->getRequest()->getParam("name");
但名称参数不存在 -getRequest()
仅返回控制器、操作和模块参数。