douyanpeng0748 2016-03-04 06:56
浏览 25
已采纳

在我的Codeigniter项目上维护会话

I am having two domain urls for my online store:

example1.com for admin,

and example2.com for front end.

My CI project on both the URLs access the same database.

So, the problem now is when I stay in the admin side, everything works fine. But if I visit the front end site once and then come back to admin url and reload, then my session is destroyed and I have to login again.

If any one can explain me why the session is being destroyed.

So, I want a solution here to access the same database in different urls in codeigniter with out destroying the session.

  • 写回答

1条回答 默认 最新

  • doukai1226 2016-03-04 07:33
    关注

    In the CI application config file, make 'sess_use_database' to true, so that session will store in database, which makes session intact on different domains.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何提取csv文件中需要的列,将其整合为一篇完整文档,并进行jieba分词(语言-python)
  • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
  • ¥15 扩散模型sd.webui使用时报错“Nonetype”
  • ¥15 stm32流水灯+呼吸灯+外部中断按键
  • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符
  • ¥15 NX MCD仿真与博途通讯不了啥情况
  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?