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

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

WBOY
WBOYOriginal
2016-06-13 13:47:171164browse

$_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']

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