取得文件扩展名方法

取得文件扩展名方法一:
$r=basename(“1/333.jpg.exe.txt”);
$arr=explode(“.”,$r);
echo “.”.$arr[count($arr)-1];

取得文件扩展名方法二:

$r=pathinfo(“1/333.jpg.exe.txt”);
echo $r[‘extension’];

发表评论

电子邮件地址不会被公开。