convert file sizes like "10M"
Posted: Sun Nov 27, 2005 5:00 pm
-
Hi,
Is there a function that may convert file size information like "10M" to the according size in bytes?
besides:
My uploads fail, because I do set the hidden field with a value I get via ini_get('upload_max_filesize'). ini_get returns "10M" instead of 10485760 (bytes).
djot
-
Hi,
Is there a function that may convert file size information like "10M" to the according size in bytes?
besides:
My uploads fail, because I do set the hidden field with a value I get via ini_get('upload_max_filesize'). ini_get returns "10M" instead of 10485760 (bytes).
Code: Select all
$form = '<input type="hidden" name="MAX_FILE_SIZE" value="'.ini_get('upload_max_filesize').'" />';djot
-