2013年10月8日

PHP获取路径后缀名的N种方法

摘要: 已知一条url,想要获取到这条路径的后缀。 1 "; 5 6 //方法1 7 print_r(pathinfo($url,PATHINFO_EXTENSION )); 8 9 //方法210 $info1=pathinfo($url);11 echo $info1['extension'];12 13 //方法314 $info2=explode(".",$url);15 echo end($info2);16 17 //方法418 $info3=substr(strrchr($... 阅读全文

posted @ 2013-10-08 13:35 macctown 阅读(7139) 评论(0) 推荐(0) 编辑

导航