Home > Backend Development > PHP Tutorial > $_SERVER['DOCUMENT_URI']能返回什么值?哪位高手知道

$_SERVER['DOCUMENT_URI']能返回什么值?哪位高手知道

WBOY
Release: 2016-06-13 10:10:05
Original
1459 people have browsed it

$_SERVER['DOCUMENT_URI']能返回什么值?谁知道啊
如果RUL是http://127.0.0.1/test.php
$a = $_SERVER['DOCUMENT_URI'];
print_r($a);为何这样也是空的,我以为会得到test.php这部分。

------解决方案--------------------
没有 $_SERVER['DOCUMENT_URI'] 这个服务器变量
------解决方案--------------------
这个服务器变量nginx有,apache无 ,iis不知。改用其它通用点的变量吧。
------解决方案--------------------
$_SERVER['REQUEST_URI'];
------解决方案--------------------
$_SERVER['REQUEST_URI']

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