zendframework标准URL参数

时间:2015-05-28 13:23:12

标签: zend-framework request

我对zend框架1有问题,我使用paywall api并使用pingback url方法,例如:

myurl.com/payback?user_id=123&foo=bar...

但问题是现在我无法读取zendframework中的参数。 只有当我这样做时它才有用

myurl.com/payback/user_id/123/foo/bar

我用不同的方法来读出来:

$q = $this->getRequest()->getQuery();
$p = $this->getRequest()->getParams();

请求对象如下所示:

object(Zend_Controller_Request_Http)[74]
protected '_paramSources' => 
array (size=2)
  0 => string '_GET' (length=4)
  1 => string '_POST' (length=5)
protected '_requestUri' => string '/index/paywall?uid=zIhvpyVslUS5ND79AfMeBPao1LjXY2Kc&goodsid=6001&slength=&speriod=&type=0&ref=&is_test=1&sig=c62538caf7a36ea2f3a795bb3dc32c07' (length=141)
protected '_baseUrl' => string '' (length=0)
protected '_basePath' => null
protected '_pathInfo' => string '/index/paywall' (length=14)
protected '_params' => 
  array (size=3)
  'controller' => string 'index' (length=5)
  'action' => string 'paywall' (length=7)
  'module' => string 'default' (length=7)
 protected '_rawBody' => null
protected '_aliases' => 
array (size=0)
  empty
protected '_dispatched' => boolean true
protected '_module' => string 'default' (length=7)
protected '_moduleKey' => string 'module' (length=6)
protected '_controller' => string 'index' (length=5)
protected '_controllerKey' => string 'controller' (length=10)
protected '_action' => string 'paywall' (length=7)
protected '_actionKey' => string 'action' (length=6)

我希望有人可以帮助我, 谢谢

0 个答案:

没有答案