Last active
December 19, 2015 04:49
-
-
Save mihai-vlc/5900145 to your computer and use it in GitHub Desktop.
PHP: get max upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_max_upl() { | |
$max_upload = (int)(ini_get('upload_max_filesize')); | |
$max_post = (int)(ini_get('post_max_size')); | |
$memory_limit = (int)(ini_get('memory_limit')); | |
return min($max_upload, $max_post, $memory_limit); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment