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信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!