PHP:session_name的目的是什么 [英] PHP: what is the purpose of session_name
本文介绍了PHP:session_name的目的是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不太清楚session_names的目的是什么. 有人可以解释一下在什么情况下定义名称会有所帮助吗?
I'm not quite sure what the purpose of session_names is.. Can someone please explain in what circumstances defining a name would be beneficial?
推荐答案
您在同一域中有两个站点. (例如,博客和论坛)
You have two sites on the same domain. (say, a blog and a forum)
它们都运行不同的软件.
They both run different pieces of software.
如果它们在同一会话上运行并且在$_SESSION
中使用相同的变量(例如,user_id
),则它们将发生冲突.
If they ran on the same session and used the same variables in $_SESSION
, (say, user_id
), they would conflict.
session_name
可让您为每个应用程序提供不同的会话.
session_name
lets you give each application a different session.
这篇关于PHP:session_name的目的是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文