1 //查询文件扩展名 2 function extension($str){ 3 $str = implode("",explode("\\",$str)); 4 $str = explode(".",$str); 5 $str = strtolower(end($str)); 6 return $str; 7 } 8 9 $file = 'D://a\b\name-Of_somefile.File.txt'; 10 echo extension($file);
posted on 2016-08-14 09:26 一坪海岸线y 阅读(145) 评论(0) 收藏 举报