[英]Get session ID based on session name
In one script, I included the following script: 在一个脚本中,我包含以下脚本:
session_name('SESSION1');
session_start();
//bla bla bla
In another script which is using another session (not named SESSION1), given only the session name used in the first script (SESSION1), how do I get the session ID being used by the first script? 在使用另一个会话的另一个脚本(未命名为SESSION1)中,仅给定第一个脚本中使用的会话名称(SESSION1),如何获取第一个脚本正在使用的会话ID?
我相信您应该能够在Cookie中找到会话ID:
$_COOKIE['SESSION1']
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.