parse_url()解析URL函数
宿镜
2023-12-01
parse_url() 是讲URL解析成有固定键值的数组的函数
$ua=parse_url("http://username:password@hostname/path?arg=value#anchor");
print_r($ua);
结果:
Array
(
[scheme] => http
[host] => hostname
[user] => username
[pass] => password
[path] => /path
[query] => arg=value
[fragment] => anchor
)