PHP解析URL是哪個函數?怎么用?
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
)
【PHP解析URL是哪個函數?怎么用?】相關文章:
2.蘇軾是哪個朝代的