I use this in a particular class
class PHPSettings {
public function getPhpMaxUploadFileSize($format = 'K', $decimals = 0)
{
$max = ['upload' => $this->parseFileSizes(ini_get('upload_max_filesize'), $format, $decimals),
'post' => $this->parseFileSizes(ini_get('post_max_size'), $format, $decimals)];
if($max['upload'] < $max['post'])
return $max['upload'];
return $max['post'];
}
public function parseFileSizes($input, $format = 'K', $decimals = 0)
{
$input = strtoupper($input);
$number = preg_replace('/[^0-9]/', '', $input);
$letter = preg_replace('/[^BKMGT]/', '', $input);
if($letter)
return round($number * pow(1024, strpos('BKMGT', $letter[0]) - strpos('BKMGT', $format[0])), $decimals);
return round($number, $decimals);
}
}
$fs = new PHPSettings;
echo $fs->getPhpMaxUploadFileSize();
Not sure if that's of any use to you, you'd need to change your ini settings to increase the upload size