dongxian4531 2014-02-06 08:27
浏览 29
已采纳

如何在一次登录下连接两个Web应用程序?

I have created two very different web applications using Yii. They both share the same database and they both use the same tables to log in. Both web applications have a link towards each other. What I'm trying to achieve is if a user happens to login to any of the apps (let's say app 1), they can transfer from app 1 to app 2 without having to login and vice versa.

I looked for session initiation and I researched that it should be found in UserIdentity.php but when I checked, there were no sessions being initiated at all. I'm not going to post code for now since the codes are working fine, it's just that I need to know how to make the user experience more flowing.

  • 写回答

2条回答 默认 最新

  • drm30963 2014-02-06 09:58
    关注

    If the applications are on the same server, you can follow this article. Basiclly you have to set the same (cookie) for both applications, and set a session path. You can also save the sessions to a database table (See Larry Ullman's article on this) as an alternative.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥60 要数控稳压电源测试数据
  • ¥15 能帮我写下这个编程吗
  • ¥15 ikuai客户端l2tp协议链接报终止15信号和无法将p.p.p6转换为我的l2tp线路
  • ¥15 经gamit解算的cors站数据再经globk网平差得到的坐标做形变分析
  • ¥15 GD32 SPI通信时我从机原样返回收到的数据怎么弄?
  • ¥15 phython读取excel表格报错 ^7个 SyntaxError: invalid syntax 语句报错
  • ¥20 @microsoft/fetch-event-source 流式响应问题
  • ¥15 ogg dd trandata 报错
  • ¥15 高缺失率数据如何选择填充方式
  • ¥50 potsgresql15备份问题