Home > Backend Development > PHP Tutorial > QQ登陆跳转有关问题

QQ登陆跳转有关问题

WBOY
Release: 2016-06-13 12:02:54
Original
1264 people have browsed it

QQ登陆跳转问题
网站使用QQ登陆,登陆成功后跳转回之前的页面,
但是使用 history.go(-1);不行,因为这会跳转到QQ的登陆界面

使用history.go(-2);无效果,会停留在本页,不会跳转,请教各位是怎么做的
------解决方案--------------------
直接跳转到实际的链接地址
------解决方案--------------------
首先,跳过来时,把来源地址也传过来。
当登入成功后,再跳转去之前传过来的地址。

例如 http://www.example.com/loginqq.php?redirecturi=news.php

当login完成后,header('location:news.php');
------解决方案--------------------
QQ登陆...应该有让你填写登陆成功后跳转的页面
如果为了回到用户之前浏览的页面,登陆前写个session保存,在上面填写的地址读取一下跳过去,然后删除

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