当前位置:网站首页>【私人系列】日常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
边栏推荐
- 【刷题篇】计算质数
- 第4章 控制执行流程
- Scrapy框架介绍
- VBA connects Access database and Excel
- 第十七届“振兴杯”全国青年 职业技能大赛——计算机程序设计员(云计算平台与运维)参赛回顾与总结
- 【Swords Offer】Swords Offer 17. Print n digits from 1 to the largest
- SwiftUI iOS Boutique Open Source Project Complete Baked Food Recipe App based on SQLite (tutorial including source code)
- Scala学习:breakable
- 谷歌AlphaFold近日宣称预测出地球上几乎所有蛋白质结构
- 运营 23 年,昔日“国内第一大电商网站”黄了...
猜你喜欢

部分分类网络性能对比

JS提升:Promise中reject与then之间的关系

MindSpore: CV.Rescale(rescale,shift)中参数rescale和shift的含义?

谷歌AlphaFold近日宣称预测出地球上几乎所有蛋白质结构

Golang logging library zerolog use record

CIMC Shilian Dafeitong is the global industrial artificial intelligence AI leader, the world's top AI core technology, high generalization, high robustness, sparse sample continuous learning, industri

The advanced version of the cattle brushing series (search for rotating sorted arrays, inversion of the specified range in the linked list)

- daily a LeetCode 】 【 191. A number of 1

【MindSpore1.2.0-rc1产品】num_workers问题

VBA 连接Access数据库和Excle
随机推荐
Entering the applet for the first time
requet.getHeader(“token“) 为null
ResNet18-实现图像分类
kotlin by lazy
Difference between Object and Map
MongoDB打破了原则引入SQL?
7.29模拟赛总结
nlohmann json 使用指南【visual studio 2022】
Does the satellite phone communicate directly with the satellite or through a ground station?
MindSpore:ImageFolderDataset数据读取问题
启动前台Activity
NC | 西湖大学陶亮组-TMPRSS2“助攻”病毒感染并介导索氏梭菌出血毒素的宿主入侵...
Hello, my new name is "Bronze Lock/Tongsuo"
不同的路径依赖
NXP IMX8QXP更换DDR型号操作流程
还有三天忙完
How architects grow
node封装一个控制台进度条插件
2种手绘风格效果比较,你更喜欢哪一种呢?
Read the "Language Model" in one article