[英]How to get value of a parameter named “controller” in zend?
In Zend I am trying to get value for a parameter named "controller" but it returns the name of the controller itself instead of the value of the parameter. 在Zend中,我试图获取名为“ controller”的参数的值,但它返回控制器本身的名称,而不是参数的值。 when I try to access the parameter from within the controller using following code. 当我尝试使用以下代码从控制器内部访问参数时。 It gives me the name of the controller instead of the value of the parameter. 它为我提供了控制器的名称,而不是参数的值。
$this->getParam('controller')//returns controller name
尝试这个 :
$this->getRequest()->getParam('controller');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.