Home > Backend Development > PHP Tutorial > PHP获取现阶段url路径的函数:QUERY_STRING、REQUEST_URI、SCRIPT.

PHP获取现阶段url路径的函数:QUERY_STRING、REQUEST_URI、SCRIPT.

WBOY
Release: 2016-06-13 10:40:06
Original
1045 people have browsed it

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


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