Home  >  Article  >  Backend Development  >  关于parse_url 的疑问,该怎么处理

关于parse_url 的疑问,该怎么处理

WBOY
WBOYOriginal
2016-06-13 13:29:14854browse

关于parse_url 的疑问
$url = $_SERVER["REQUEST_URI"]; //$url = 123/index.php/web/index
$parse_url = parse_url($url);  
$url_query = $parse_url["query"];
我的理解:$parse_url["query"];不是应该返回个null吗
可为什么会报 query 未定义啊 ?

------解决方案--------------------
print_r($parse_url);
就可以看到

null 就是未定义

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