Skip to content

Instantly share code, notes, and snippets.

@mihai-vlc
Last active December 19, 2015 04:49
Show Gist options
  • Save mihai-vlc/5900145 to your computer and use it in GitHub Desktop.
Save mihai-vlc/5900145 to your computer and use it in GitHub Desktop.
PHP: get max upload
<?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