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条)

报告相同问题?