Posted in 面试题 onMay 09, 2013
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
)
$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
)
PHP解析URL是哪个函数?怎么用?
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@