Possible Duplicate:
POST Content-Length exceeds the limit
PHP Warning: POST Content-Length of 113 bytes exceeds the limit of -1988100096 bytes in Unknown
I have form for upload images, I testing and if I upload image, where have for example 9 mb size, php returns error:
POST Content-Length of 10194008 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
I want that dont upload files more than 2 mb, in first line I have this code:
if (!empty($_FILES['main_photo']['name'])) {
if ( $_FILES['main_photo']['size'] > 1024 * 1024 * 2 ) {
header("Location: index.php");
exit();
}
}
but this error still displayed, please tell what make, I want if file more than 2 mb, just:
header("Location: index.php");