标签:
$url_path = ‘http://www.sina.com.cn/abc/de/fg.php?id=1‘;
$temp = pathinfo($url_path,PATHINFO_BASENAME);
$temp = explode("?", $temp);
$temp1 = substr($temp[0], 2,5);
echo $temp1;
写一个函数尽可能高效的,从一个标准url里取出文件的扩展名
原文地址:http://www.cnblogs.com/xueyunhuan/p/5388565.html