特牛生活网

php获取文件扩展名的方法-CSDN博客

网友收藏
文章浏览阅读390次。1function get_extension($file){ return substr(strrchr($file, '.'), 1); }2、function get_extension($file){ return substr($file, strrpos($file, '.')+1); strrpos获得$file中特定字符最后出现的位置}