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屋!
查看全文