Created
May 8, 2013 23:04
-
-
Save nunomazer/5544358 to your computer and use it in GitHub Desktop.
Function to get the max file upload allowed by php.ini configuration
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 getMaxFileUpload() { | |
$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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment