PHP解析URL是哪個函數(shù)?怎么用?
parse_url() 是講URL解析成有固定鍵值的'數(shù)組的函數(shù)
$ua=parse_url(“http://username:password@hostname/path?arg=value#anchor”);
print_r($ua);
結(jié)果:
Array
(
[scheme] => http
[host] => hostname
[user] => username
[pass] => password
[path] => /path
[query] => arg=value
[fragment] => anchor
)
【PHP解析URL是哪個函數(shù)?怎么用?】相關(guān)文章:
php字符轉(zhuǎn)URL地址的函數(shù)11-11
21種PHP 危險函數(shù)全解析11-18
PHP網(wǎng)絡(luò)操作函數(shù)11-19
PHP的壓縮函數(shù)11-15
怎么用cad畫函數(shù)圖10-02
淺析php函數(shù)的實例11-18
PHP網(wǎng)絡(luò)操作函數(shù)講解11-10
php本地域名解析怎么設(shè)置11-10