views:

54

answers:

3

I'v searching for a while in php.net and I don't find what I'm searching. I need a function to know the max_upload_filesize from a PHP function.

Here what I need: http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize

Thanks in advance!

+1  A: 

ini_get

Col. Shrapnel
fast as the wind!
Marc
+3  A: 

Use ini_get() function:

<?php
$upload_max_size = ini_get('upload_max_filesize');
vartec
more accurate, accepted answer for that!
Marc
with underscore "_"
Marc
you're right ;-)
vartec
+1  A: 

In addition to upload_max_filesize, watch out for post_max_size. Whichever is the smaller will be enforced

Mark Baker