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

How to get the address of the current page and the previous page in PHP?

WBOY
Release: 2016-07-29 08:35:21
Original
1208 people have browsed it

$_SERVER['HTTP_REFERER'] //You can 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

The above introduces how to get the address of the current page and the previous page in PHP, "The person who gets you, but I can't get your heart" lyrics, including the content of the lyrics of "The person who gets you, but I can't get your heart". I hope it will be helpful to PHP. Tutorials are helpful for those who are interested.

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