Maximum allowed size for uploaded files. upload_max_filesize = 1024M
I was wondering if the above "1024M" means 1,024 MB?
I am trying to fix this to 100MB so what would I put in ?
$filesize = filesize("example.jpg"); // number is in bytes. $max_filesize = 20*1024; // 20KB * 1024 bytes = 20480 bytes.. if($filesize>$max_filesize){ echo "File size is more than 20 KB"."<br>"; } else { echo "File size is 20KB or smaller"."<br>"; }
🙂
M stands for megabyte so 100MB limit should be:
upload_max_filesize = 100M
See http://pl2.php.net/manual/en/faq.using.php#faq.using.shorthandbytes for more info.