gpt4 book ai didi

php - 在 IFRAME 中传递 Session 信息

转载 作者:行者123 更新时间:2023-12-04 05:49:18 27 4
gpt4 key购买 nike

我有一个 iFRAME,它位于不在同一个域中的页面上。我正在尝试通过 url 传递 session ID。我设置了这样的网址......

 applyonline.php?session_id=3u8ob97d5e3h35povbnuraih22

然后我读了那个 session ID......
   $session_id = $_GET['session_id'];
session_id($session_id);

我试过设置这些无济于事......
   ini_set('session.use_cookies', '0');
ini_set('session.use_trans_sid', '1');

我疯狂地用谷歌搜索了这个,找不到适合我的解决方案。

顺便说一句,Firefox 工作正常,因为它在 iFRAME 中接受 3rd 方 cookie,IE 是问题所在。

最佳答案

使用 ?PHPSESSID=取而代之的论据。

描述了最干净的方法 in the docs :

url.php?<?= htmlspecialchars(SID) ?>

关于php - 在 IFRAME 中传递 Session 信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10273688/

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