Home > Backend Development > PHP Tutorial > 请问PHP如何在登陆验证成功后跳转到登陆前访问的页面

请问PHP如何在登陆验证成功后跳转到登陆前访问的页面

WBOY
Release: 2016-06-23 13:56:39
Original
1120 people have browsed it

请问PHP如何在登陆验证成功后跳转到登陆前访问的页面


回复讨论(解决方案)

header()

header("location:xxx.php");
Copy after login

用$_SERVER['HTTP_REFERER'] 获取来源地址。当登入成功后,你会把用户信息写入session。然后返回的地址使用
$_SERVER['HTTP_REFERER'] 就可以了。

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