多个会话实例Codeigniter [英] Multiple Session Instances Codeigniter

查看:107
本文介绍了多个会话实例Codeigniter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个应用程序使用Codeigniter,我们遇到一些麻烦,当一个会话加载,有人加载另一个URL,将启动一个会话与同一个应用程序。



问题是第二个会话正在覆盖初始会话(至少部分)并破坏正在发送的数据。



我们使用数据库会话和加密。 / p>

寻找这方面的帮助。提前感谢。

解决方案

这是您的上一个主题:



多个PHP会话



另一件不是如果您需要为相同的数据/数据占位符进行多个会话,则使用标识前缀来预置会话变量,例如:

  $ _ SESSION ['ss1_name'] =会话1名称; 

...

$ _SESSION ['ss2_name'] =会话2名称;

希望这有助于!


So I have an app built using Codeigniter and we are experiencing some trouble when a session is loaded and someone loads another URL that would start a session with the same app.

The problem is that the second session is overwriting the initial session (at least partially) and corrupting the data being sent.

We are using database sessions and encryption.

Looking for help on this. Thanks in advance.

解决方案

Here's a previous thread for you:

Multiple PHP Sessions

Another thing not mentioned in that thread is, if you need multiple sessions for the same data/data placeholders, to prepend the session variables with identifying prefixes, e.g.:

$_SESSION['ss1_name'] = "Session 1 Name";

...

$_SESSION['ss2_name'] = "Session 2 Name";

Hope this helps!

这篇关于多个会话实例Codeigniter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆