1
I set up the php.ini and changed the maximum allowed size for uploading 12MB.
In PHP, I also limited the upload size to 12MB, as follows:
if($_FILES['imagem']['size']>12582912){
echo "Limite máximo 12 MB!";
//...
}
The problem is if you try to upload a file over 12MB, it shows no error and simply does nothing.
If you change the php.ini and increase the limit to 1GB (for example) and only in the application limit to 12MB, so it already works if you try to send a file with more than 12MB, the error message appears.
Because the error does not appear when I limit everything to 12MB (php.ini and the script) and try to upload with more than 12MB?