note 74520 rejected from function.filesize by bjori
| From: | bjori@php.net | Date: | Tue, 17 Apr 2007 09:41:50 +0000 |
| Subject: | note 74520 rejected from function.filesize by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125514@lists.php.net to get a copy of this message | ||
Note Submitter: telefon at diafysal dot net
----
I made some changes to the "human readable size" code posted earlier.
<?php
function size_hum_read($size){
$i=0;
$iec = array("B", "KB", "MB", "GB", "TB",
"PB", "EB", "ZB", "YB");
while (($size/1024) >= 1){
$size /= 1024;
$i++;
}
return round($size, 1).' '.$iec[$i];
}
?>