如何从同一台服务器上的2个网站加入2个不同的SQL数据库?

时间:2020-12-30 09:51:35

I have 2 websites with different framework (Codeigniter and Kohana). I installed Kohana website as subdomain and Codeigniter website as main website on SAME SERVER, and they both have different database. I try to make signup and login user information are the same for both website, and user dont have to login again when going to subdomain website.

我有2个不同框架的网站(Codeigniter和Kohana)。我安装了Kohana网站作为子域名和Codeigniter网站作为SAME SERVER上的主要网站,他们都有不同的数据库。我尝试进行注册并且两个网站的登录用户信息都是相同的,并且用户在转到子域网站时不必再次登录。

  1. What i am trying to do is when users go to home page signup for an account, then that information could pass into those two different databases. So when they log in those 2 websites, they could log in using the same login information.

    我想要做的是当用户进入主页注册帐户时,该信息可以传递到这两个不同的数据库。因此,当他们登录这两个网站时,他们可以使用相同的登录信息登录。

  2. Users dont have to log in again if they already log into either website.

    如果用户已经登录任一网站,则无需再次登录。

Can anyone suggest me a way, maybe share some documentations about this coding or show me how to do it?

任何人都可以建议我一种方式,也许可以分享一些有关此编码的文档或告诉我如何做到这一点?

Thank you so much

非常感谢

1 个解决方案

#1


0  

Yes, you could join using queries. About login using same information and when you log in 1 website, other website is automatically logged in. This you might need to use Json authentication.

是的,您可以使用查询加入。关于使用相同信息登录,当您登录1个网站时,其他网站会自动登录。您可能需要使用Json身份验证。

Utility, if he knows, i will not ask that question. And did you even read number 1 and 2 more specific that he is asking

效用,如果他知道,我不会问这个问题。你甚至读过他要问的第1和第2更具体的内容吗?

#1


0  

Yes, you could join using queries. About login using same information and when you log in 1 website, other website is automatically logged in. This you might need to use Json authentication.

是的,您可以使用查询加入。关于使用相同信息登录,当您登录1个网站时,其他网站会自动登录。您可能需要使用Json身份验证。

Utility, if he knows, i will not ask that question. And did you even read number 1 and 2 more specific that he is asking

效用,如果他知道,我不会问这个问题。你甚至读过他要问的第1和第2更具体的内容吗?