Home  >  Article  >  Backend Development  >  为什么小弟我打印不出来$_SERVER['PATH_INFO']呢

为什么小弟我打印不出来$_SERVER['PATH_INFO']呢

WBOY
WBOYOriginal
2016-06-13 12:20:10950browse

为什么我打印不出来$_SERVER['PATH_INFO']呢
即然是全局数组,按说应该能啊,但是var_dump后是一个NULL,啥回事呢,
------解决思路----------------------
$_SERVER 是超全局数组,并不表示他的每一项都存在
比如 $_GET、$_POST 不都是有条件有值的吗
------解决思路----------------------
包含由客户端提供的、跟在真实脚本名称之后并且在查询语句(query string)之前的路径信息,如果存在的话。例如,如果当前脚本是通过 URL http://www.example.com/php/path_info.php/some/stuff?foo=bar 被访问,那么 $_SERVER['PATH_INFO'] 将包含 /some/stuff。 

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