[英]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.com
和www.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.