| 1 comments ]

function ByteSize($bytes)
{
$size = $bytes / 1024;
if($size < 1024)
{
$size = number_format($size, 2);
$size .= ' KB';
}else {
if($size / 1024 < 1024) {
$size = number_format($size / 1024, 2);
$size .= ' MB';
} else if($size / 1024 / 1024 < 1024) {
$size = number_format($size / 1024 / 1024, 2);
$size .= ' GB';
}
}
return $size;
}

1 comments

suganya said... @ Friday, January 28, 2011 at 10:10:00 PM GMT

great

Post a Comment

Please put your comments here. your questions, your suggestions, also what went wrong with me.