All pastes #544427 Raw Edit

Something

public text v1 · immutable
·published 2007-06-06 12:55 UTC
rendered paste body
//This is our size condition
if ($uploaded_size > 1024)
{
echo "Your file is too large.<br>";
$ok=0;
}

$fileext = file_extension($_FILES['uploaded']['name']);


$fileexto = strtoupper($fileext);
echo '|'.$fileexto.'|';

$exclude = array('ZIP' , 'RAR' , 'GIF' , 'PNG' , 'JPG' , 'BMP' , 'TXT' , 'HTM' , 'HTML' , 'VTF' ,  'VMT' , 'EXE' , 'DLL' , 'CFG');


if (in_array($filexto, $exclude))
{


}
else
{
die(' YOU TRIED TO UPLOAD A FILE WHICH IS NOT ALLOWED');
}