Php de dosya uzantısı bulma

<?php
getFileExt($fileName)
{
return substr(strtolower(strrchr($fileName,'.')),1);
}

$dosya = 'nurettin.class.php.tar.gz';

if (getFileExt($dosya) == 'gz')
{
echo "dosya uzantısı gz";
}
else
{
echo "dosya uzantısı gz degil";
}
?>


Twitter Digg Delicious Stumbleupon Technorati Facebook
Yazar :

Tasarım rehberi yöneticisi

http://www.tasarimrehberi.com

Henüz Yorum yazılmamış... İlk Yorumu siz yazabilirsiniz!