我想重定向用户到一个外部支付闸门与一些参数使用zend.is,有没有标准的方法做到这一点?
非常感谢您的建议和建议。
谢谢。
发布于 2011-03-31 05:12:31
您可以使用http_build_query的内置PHP函数来构建参数,然后将其提供给Zend Framework的gotoUrlAndExit()函数。
$url = "https://external.gateway.com/";
$data = array('foo'=>'bar',
'baz'=>'boom',
'cow'=>'milk',
'php'=>'hypertext processor');
$query = http_build_query($data);
$this->_helper->redirector->gotoUrlAndExit($url . '?' . $query);发布于 2011-03-29 23:26:56
在ZF中有Redirector动作帮助器。它有名为gotoUrl()和gotoUrlAndExit()的方法,可用于转到外部urls。也许这个帮手会适合你的需要。
发布于 2011-03-30 02:14:37
$this->_redirect($url);把它付诸于行动
https://stackoverflow.com/questions/5472004
复制相似问题