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

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

WBOY
Release: 2016-06-13 13:29:14
Original
878 people have browsed it

关于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 就是未定义

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