When using
ini_get(\"upload_max_filesize\");
it actually gives you the string specified in the php.ini file.
It is not good to use
This is what I use:
function asBytes($ini_v) { $ini_v = trim($ini_v); $s = [ 'g'=> 1<<30, 'm' => 1<<20, 'k' => 1<<10 ]; return intval($ini_v) * ($s[strtolower(substr($ini_v,-1))] ?: 1); }