Created
April 1, 2014 04:42
-
-
Save kythin/9907830 to your computer and use it in GitHub Desktop.
PHP Upload Size
This file contains hidden or 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 getMaxUploadMB() { | |
$max_upload = (int)(ini_get('upload_max_filesize')); | |
$max_post = (int)(ini_get('post_max_size')); | |
$memory_limit = (int)(ini_get('memory_limit')); | |
$upload_mb = min($max_upload, $max_post, $memory_limit); | |
return $upload_mb; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment