parse_url 和再pathinfo,what you'll get

echo $row->link ."<br>\n";
pr($arr);
echo $arr['path']  ."<br>\n";
$arr2 = pathinfo($arr['path']);
pr($arr2);

Array
(
    [scheme] => http
    [host] => www.58.com
)
Array
(
    [scheme] => http
    [host] => www.moonbasa.com
    [path] => /source.aspx
    [query] => a_id=1188-mingzhan&url=http://www.moonbasa.com/
)
http://jump.all4ad.cn/jump.aspx?id=858
Array
(
    [scheme] => http
    [host] => jump.all4ad.cn
    [path] => /jump.aspx
    [query] => id=858
)
/jump.aspx
Array
(
    [dirname] => \
    [basename] => jump.aspx
    [extension] => aspx
    [filename] => jump
)
http://go2000.tuike.cn/mylink/45
Array
(
    [scheme] => http
    [host] => go2000.tuike.cn
    [path] => /mylink/45
)
/mylink/45
Array
(
    [dirname] => /mylink
    [basename] => 45
    [filename] => 45
)

你可能感兴趣的:(parse_url 和再pathinfo,what you'll get)