Returns the maximum size of an uploaded file as configured in php.ini
int The maximum size of an uploaded file in bytes
public static function getMaxFilesize() {
$max = trim(ini_get('upload_max_filesize'));
if ('' === $max) {
return PHP_INT_MAX;
}
switch (strtolower(substr($max, -1))) {
case 'g':
$max *= 1024;
case 'm':
$max *= 1024;
case 'k':
$max *= 1024;
}
return (int) $max;
}