tp框架,跨域注册表和登录的问题

WBOY
Release: 2016-06-06 20:43:56
Original
781 people have browsed it

网站b.xxx.com 有个新项目要写个注册口和登录口,如何重新写方法了,直接调用到主站a.xxx.com的控制器方法什么的。

回复内容:

网站b.xxx.com 有个新项目要写个注册口和登录口,如何重新写方法了,直接调用到主站a.xxx.com的控制器方法什么的。

  • 如果是同一个顶级域名,可以使用ajax调用,登陆成功之后写入session和cookie并刷新页面,注意session对应的cookie生效域名应该是xxx.com

  • 如果顶级域名不同,请参考“单点登录”,可以使用ucenter

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!