note 73427 deleted from features.file-upload by felipe

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: Buzer at buzer dot net 

----

Fairly easy way to generate MAX_FILE_SIZE:
<?php
$maxsize = ini_get('upload_max_filesize');
if (!is_numeric($maxsize)) {
	if (strpos($maxsize, 'M') !== false)
		$maxsize = intval($maxsize)*1024*1024;
	elseif (strpos($maxsize, 'K') !== false)
		$maxsize = intval($maxsize)*1024;
	elseif (strpos($maxsize, 'G') !== false)
		$maxsize = intval($maxsize)*1024*1024*1024;
}
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.$maxsize.'" />';
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.