megento 获取url参数

if we have the following requirement:

http://host/index.php/?resid=anyvalue    

http://host/index.php/storeviewname/?resid=anyvalue, or ......?resid=anyvalue

 

//get all Parameters.
$this->getRequest()->getParams()

//get any specifically
$this->getRequest()->getParam(KEY) .

//Ex:  $this->getRequest()->getParam('resid')
 

 

来源:http://stackoverflow.com/questions/8430214/how-to-capture-an-url-parameter-magento

 

你可能感兴趣的:(url)