简体   繁体   English

PHPSESSID Cookie 自动创建,无需调用 session_start()

[英]PHPSESSID Cookie automatically created without calling session_start()

Why is PHPSESSID Cookie automatically created even if i didn't call session_start() function, even if i didn't wrote a single line of php code, but when i check dev-tools in my browser cookie is there and it has 32bit string value.为什么即使我没有调用 session_start() function,PHPSESSID Cookie 也会自动创建,即使我没有写一行 php 代码,但是当我在浏览器中检查开发工具时,cookie 是否存在并且它有 32 位字符串价值。 I succeeded to get it's value on the very first line of php code.我成功地在 php 代码的第一行获得了它的价值。 When i delete it and refresh my page new cookie with new value is automatically generated.当我删除它并刷新我的页面时,会自动生成具有新值的新 cookie。

Why is this happening?为什么会这样? Does maybe php or XAMPP do it under the hood or this is normal behaviour and i didn't get this concept properly也许 php 或 XAMPP 是在幕后做的,或者这是正常行为,我没有正确理解这个概念

There is INI-Setting (session.auto_start = 1) that most probably causes this issue.最有可能导致此问题的 INI 设置 (session.auto_start = 1)。

Please check your.ini-Settings.请检查 your.ini-Settings。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM