public static function getMaxUploadSize()
    {
        if (!ini_get('file_uploads')) {
            return 0;
        }

        $max = 0;

        try {
            $max = FormUtils::sizeToBytes(ini_get('upload_max_filesize'));
        } catch (\Exception $e) {
        }

        try {
            $max2 = FormUtils::sizeToBytes(ini_get('post_max_size'));
            if ($max2 < $max || $max == 0) {
                $max = $max2;
            }
        } catch (\Exception $e) {
        }

        return $max;
    }
public static function getMaxUploadSize()
    {
        if (!ini_get('file_uploads')) {
            return 0;
        }

        $max = 0;

        try {
            $max = FormUtils::sizeToBytes(ini_get('upload_max_filesize'));
        } catch (\Exception $e) {
        }

        try {
            $max2 = FormUtils::sizeToBytes(ini_get('post_max_size'));
            if ($max2 < $max || $max == 0) {
                $max = $max2;
            }
        } catch (\Exception $e) {
        }

        return $max;
    }
public static function getMaxUploadSize ( ) { if ( ! ini_get ( 'file_uploads' ) ) { return 0 ; } $ max = 0 ; try { $ max = FormUtils :: sizeToBytes ( ini_get ( 'upload_max_filesize' ) ) ; } catch ( \ Exception $ e ) { } try { $ max2 = FormUtils :: sizeToBytes ( ini_get ( 'post_max_size' ) ) ; if ( $ max2 < $ max || $ max == 0 ) { $ max = $ max2 ; } } catch ( \ Exception $ e ) { } return $ max ; }
Return the max upload size in bytes
@return int
Return the max upload size in bytes