PHP get actual maximum upload size

前端 未结 6 469
Happy的楠姐
Happy的楠姐 2020-12-04 16:38

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

6条回答
  •  执笔经年
    2020-12-04 17:05

    Well you can always use this syntax, which will give you correct numbers from PHP ini file:

    $maxUpload      = (int)(ini_get('upload_max_filesize'));
    $maxPost        = (int)(ini_get('post_max_size'));
    

    Mart

提交回复
热议问题