function thousandKilo($count) {
if($count < 1000) {
return $count;
}
else {
return str_replace(",",".",(round($count,-2)/1000)) .'K';
}
}
function format($size){
$filesizename = array( " Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB" );
return $size ?
$format = round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $filesizename[$i] : '0 ' . $filesizename[0];
return format;
}
function format($size,$prefix=0){
if (is_numeric($size) && $size>=1000 && $prefix<8) {
$size = format(floor($size/1000),$prefix+1);
return $size;
} else {
$prefixName = ["B","KB","MB","GB","TB","PB","EB","ZB","YB"];
return $size . $prefixName[$prefix];
}
}