Home > Backend Development > PHP Tutorial > php获取现阶段url路径的函数

php获取现阶段url路径的函数

WBOY
Release: 2016-06-13 12:48:34
Original
779 people have browsed it

php获取当前url路径的函数

转:

PHP获取当前url路径的函数:QUERY_STRING、REQUEST_URI、SCRIPT..

PHP获取当前url路径的函数及服务器变量:QUERY_STRING、REQUEST_URI、SCRIPT..?
?
?


Php代码??收藏代码
  1. $_SERVER["QUERY_STRING"]获取查询语句,实例中可知,获取的是?后面的值??
  2. $_SERVER["REQUEST_URI"]?获取http://172.16.1.7后面的值,包括/??
  3. $_SERVER["SCRIPT_NAME"]?获取当前脚本的路径,如:jms.php??
  4. $_SERVER["PHP_SELF"]?当前正在执行脚本的文件名??
Related labels:
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