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

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

WBOY
WBOYOriginal
2016-06-23 13:56:391059browse

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


回复讨论(解决方案)

header()

header("location:xxx.php");

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

Statement:
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