Created on 28/02/2008 11:40 by TEXMEX
//vérification d'extention
function checkExtention( $file){
$file = 'myfile.rar';
$ext_Array =
array("zip",
"rar",
"jpg",
"jpeg",
"gif",
"bmp");
// Check file
$file_Ext =
explode('.',
$file);
// Explode the extention $file_Ext =
strtolower($file_Ext[1]);
// Modify case return (in_array($file_Ext,
$ext_Array))?
true:
false;
}
}
checkExtention( 'test.rar')