gpt4 book ai didi

php - 发送 : Redirect to Action with parameters

转载 作者:IT王子 更新时间:2023-10-29 01:06:37 26 4
gpt4 key购买 nike

我正在使用 zend 框架。我正在使用以下语句重定向到另一个操作。

$this->_helper->redirector('some_action');

以上语句运行良好,调用了“some_action”。现在我想像这样将一些参数传递给“some_action”。

some_action?uname=username&umail=username@example.com

以及如何在调用的 Action 中获取参数。通常我们这样做:

$userName = $_REQUEST['uname'];
$usermail = $_REQUEST['umail'];

如何执行此操作?请示例代码。谢谢

最佳答案

你可以试试重定向器:

$params = array('user' => $user, 'mail' => $mail);
$this->_helper->redirector($action, $controller, $module, $params);

关于php - 发送 : Redirect to Action with parameters,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1913509/

26 4 0