这是我的代码:
$sm = $this->getServiceLocator();
$session = $sm->get('SessionContainer');
$client = $session->offsetGet('client');
$url = "http://local.clients.com/"
$this->redirect()->toUrl($url);
我希望能够将$ client传递给$ url,例如
$this->redirect()->toUrl($url,$client);
感谢。
答案 0 :(得分:0)
只需将数据添加到查询字符串中:
$url = "http://local.clients.com/";
$url .= '?'.http_build_query(array('client' => $client));
return $this->redirect()->toUrl($url);