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;
}
[Friday, January 11, 2008
|
1 comments
]
Popular Posts
- function to check whether the year given is a leap year or not
- Elgg : The most popular open source social networking platform
- Jquery based dynamic adding and removal of html elements.
- php Questions
- Creating Google map and adding markers ans polyline on it
- Php Questions
- Questoin regarding classes
- php Questions
- php questions
- How to create a plugin in elgg.
1 comments
great
Post a Comment
Please put your comments here. your questions, your suggestions, also what went wrong with me.