gpt4 book ai didi

php - _SESSION ['xxx' ] 未在我的 Web 应用程序中跨页面保留

转载 作者:行者123 更新时间:2023-11-28 03:43:38 25 4
gpt4 key购买 nike

我有一个包含内联 php 的 html 文件。 index.html 大致如下所示

<?php session_start(); echo $_SESSION['xxx']; ?>
<form action=blah.php> ... </form>

在 blah.php 中,我做了一个

    $_SESSION['xxx'] = "foo";
header('Location: index.html');

但是,当第二次显示 index.html 时,我没有看到“foo”消息。

最佳答案

然后检查您的服务器设置。尝试在地址行中设置发送 session 值(如 GET 请求)。

关于php - _SESSION ['xxx' ] 未在我的 Web 应用程序中跨页面保留,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8547828/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com