I'v searching for a while in php.net and I don't find what I'm searching. I need a function to know the max_upload_filesize from a PHP function.
Here what I need: http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
Thanks in advance!
The default PHP values are 2 MB for upload_max_filesize, and 8 MB for post_max_size.
upload_max_filesize is the maximum size of an uploaded file. This is the limit for a SINGLE file. post_max_size, on the other hand, is the limit of the entire body of the request (which may include multiple files as well as other stuff).
Use ini_get() function:
<?php
$upload_max_size = ini_get('upload_max_filesize');
In addition to upload_max_filesize, watch out for post_max_size. Whichever is the smaller will be enforced
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With