seems php have a bug on this topic:
the $_FILES variable is set to zero and so with the temporary name if the fiel is above the upload_max_filesize
i try to use this function but the $val and $last do not contain any value:
function return_bytes ( $val )
{
$val = trim ( $val );
$last = strtolower ( $val{strlen ( $val) - 1} );
switch ( $last )
{
case 'g':
$val = 1024;
case 'm':
$val = 1024;
case 'k':
$val *= 1024;
}
return $val;
}
/test/
if ( ( $_SERVER["CONTENT_LENGTH"] ) > ( return_bytes(ini_get("upload_max_filesize")) ) )
{
$msg .= '<br>filesize is greater than the limit.\n';
}
}
Anyone has any idea why?
Thank´s in advance