在localhost中使用多个项目时出现Codeigniter会话问题 [英] Codeigniter session issue while use more than one project in localhost

查看:101
本文介绍了在localhost中使用多个项目时出现Codeigniter会话问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在localhost中使用多个codeigniter项目时,我看到一个session / cookie问题。我的意思是假设如果我在 http:// localhost / site1 中托管的一个网站中创建了登录模块,并且在 http:// localhost / site2 其中我也使用相同的代码,不同的数据库和不同的$ config ['encryption_key' / cookie在site1中过期。

I seen one issue of session/cookie while using more than one project of codeigniter in localhost. I means suppose if i have created login module in one website hosted in http://localhost/site1 and i login in http://localhost/site2 where i also use same code except different database and different $config['encryption_key'] then still my session/cookies are expired in site1. Only one site's cookies/session are working in codeigniter in localhost.

你能帮我一下,如何解决这个问题?

Can you help me , how to resolve this ?

推荐答案

在application / config / config.php文件中从$ config中更改sess_cookie_name值

change sess_cookie_name value from $config in application/config/config.php file

这篇关于在localhost中使用多个项目时出现Codeigniter会话问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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