Home >Backend Development >PHP Tutorial >PHP gets the two codes of the current page url path

PHP gets the two codes of the current page url path

WBOY
WBOYOriginal
2016-07-25 09:00:06844browse
  1. $url_this = "http://".$_SERVER ['HTTP_HOST'].$_SERVER['PHP_SELF'];
  2. echo $url_this;
  3. ?>
Copy code

2. Current page path

  1. ?>
Copy code

server_port can be selected as needed.

You can also refer to the following articles: What are the php codes to get the complete URL of the current page? php code to get the complete url of the current page



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