当前位置:网站首页>【私人系列】日常PHP遇到的各种稀奇古怪的问题
【私人系列】日常PHP遇到的各种稀奇古怪的问题
2022-07-30 19:11:00 【暂时先用这个名字】
一、php后一个页面死活获取不到前一个页面的session
过程:
1、生成一个token,存储在服务器session中,提交token给前端页面;
2、前端提交表单时同时提交该token,结果服务器中的session为空;
可能性:
前端页面cookie中存储该session的id,但提交给后端时,该id对应session消失或出错;
解决:
研究一天,时好时坏,在不同浏览器中可能好可能坏,正当崩溃之时,似乎一切都好了但很快又挂了。。。
后又推测是当时在进行安全演防,session一超过数量就被清理,于是cookie对应的session就不见了,当然,这个推测是极其不靠谱的,妥妥的失败。。。
将php升级到最新版本,依旧不对。。。蓸
最后,tmd,是把这句给删了才正常了
session_set_cookie_params(0,NULL,NULL,TRUE); //cookie必须使用httponly
边栏推荐
猜你喜欢
Talking about Contrastive Learning (Contrastive Learning) the first bullet
The use of @ symbol in MySql
MindSpore:对image作normalize的目的是什么?
NXP IMX8QXP更换DDR型号操作流程
MindSpore:【Resolve node failed】解析节点失败的问题
生物医学论文有何价值 论文中译英怎样翻译效果好
Mysql执行原理剖析
After 23 years of operation, the former "China's largest e-commerce website" has turned yellow...
【Swords Offer】Swords Offer 17. Print n digits from 1 to the largest
谷歌AlphaFold近日宣称预测出地球上几乎所有蛋白质结构
随机推荐
The use of @ symbol in MySql
电脑死机的时候,发生了什么?
The large-scale application of artificial intelligence AI products in industrial-grade mature shipping ports of CIMC World Lianda will create a new generation of high-efficiency smart ports and innova
云数据库和本地数据库有什么区别?
What is the difference between a cloud database and an on-premises database?
Go 系统收集
6块钱1斤,日本公司为何来中国收烟头?
Scala学习:类和对象
nlohmann json 使用指南【visual studio 2022】
Multiple instances of mysql
【MindSpore】多卡训练保存权重问题
node封装一个控制台进度条插件
MindSpore:数据处理问题
防抖和节流有什么区别,分别用于什么场景?
AI Basics: Graphical Transformer
Chapter 14 Type Information
Listen to the boot broadcast
JS提升:Promise中reject与then之间的关系
DM8:单库单实例搭建本地数据守护服务
【每日一道LeetCode】——191. 位1的个数