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

请教PHP怎么在登陆验证成功后跳转到登陆前访问的页面

WBOY
WBOYOriginal
2016-06-13 11:57:551257browse

请问PHP如何在登陆验证成功后跳转到登陆前访问的页面
请问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