简体   繁体   English

在具有不同数据库的第一个 codeigniter 中的第二个 codeigniter 中使用相同的 codeigniter 文件会话

[英]Use same codeigniter files session in second codeigniter from the first one which are having different database

I have two codeigniter projects working on www.domain.com and www.domain.com/blog .我有两个 codeigniter 项目在www.domain.comwww.domain.com/blog I want to use the same session generated in domain.com.我想使用在 domain.com 中生成的相同会话。 Using the login of the first one.使用第一个的登录。 I tried having same sess_save_path for both the codeigniters but does not work.我尝试为两个 codeigniters 使用相同的 sess_save_path 但不起作用。

Option 1: If you are using APIs to handle request.选项 1:如果您使用 API 来处理请求。 Try using JSON web token尝试使用 JSON 网络令牌

ref: https://jwt.io/参考: https : //jwt.io/

Option 2: Use Local Storage for both Codeigniter选项 2:为两个 Codeigniter 使用本地存储

ref: https://www.w3schools.com/jsref/prop_win_localstorage.asp参考: https : //www.w3schools.com/jsref/prop_win_localstorage.asp

there are many different options available.有许多不同的选择。

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

相关问题 Codeigniter从数据库中加载第二个不同的数据数组,第二个依赖于第一个,并加载到视图中 - Codeigniter loading two different data array from a database with the second one is dependent with the first one and load into a view 在一台服务器的两个不同域上共享来自数据库的 codeignit 会话 - Share codeigniter session from database on two different domain in one server CodeIgniter:第一个查询成功运行,第二个未能更改数据库。 相同的值,不同的表 - CodeIgniter: first query runs successfully, second fails to change the database. Same value, different tables 在一个视图中使用来自同一数据库的两个表 - use two tables from same database in one view codeigniter 在Codeigniter中遇到会话问题 - Having issue with session in codeigniter 具有不同的服务器端和数据库字符集-CodeIgniter - Having different server side and database charsets - CodeIgniter 我应该将哪个会话库与CodeIgniter一起使用? - Which session library should I use with CodeIgniter? CodeIgniter 3正在数据库中为一个会话生成多个会话 - CodeIgniter 3 is generating multiple sessions in the database for one session 如何将Codeigniter文件从一个目录访问到另一个目录 - How to access codeigniter files from one directory to another different directory 在Codeigniter中使用第二个数据库 - Using the second database in Codeigniter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM