Conoscere l’estensione di un file con php

Posted on 16. Jun, 2008 by Administrator in php, tutorials


function _getExtension($file)
{
$ext = '';
if (strrpos($file, '.')) {
$ext = strtolower(substr($file, (strrpos($file, '.') ? strrpos($file, '.') + 1 : strlen($file)), strlen($file)));
}
return $ext;
}


Correlati

One Comment

Yuri

24. Jun, 2008

Leave a reply