在PHP中重定向时如何保留所有POST信息? [英] How to keep all the POST information while redirecting in PHP?
本文介绍了在PHP中重定向时如何保留所有POST信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
header('Location: ' . $uri);
这将丢失所有 $_POST
信息.
This will miss all the $_POST
information.
推荐答案
如果你想将你的 POST
数据传送到另一个页面(除了 action
页面)然后使用
if u want to carry forward your POST
data to another pages ( except the action
page) then use
session_start();
$_SESSION['post_data'] = $_POST;
这篇关于在PHP中重定向时如何保留所有POST信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文