Home > Backend Development > PHP Tutorial > How to get the addresses of the current page and the previous page in PHP?_PHP Tutorial

How to get the addresses of the current page and the previous page in PHP?_PHP Tutorial

WBOY
Release: 2016-07-21 16:00:14
Original
1109 people have browsed it

$_SERVER['HTTP_REFERER'] //Get the address of the previous page
$_SERVER[PHP_SELF] //Get the address of the current page
$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"]." ?".$_SERVER["QUERY_STRING"] //This can get the address with parameters

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317186.htmlTechArticle$_SERVER['HTTP_REFERER']//You can get the address of the previous page$_SERVER[PHP_SELF]//Get Current page address $_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]//This can...
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