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;
}
Showing posts with label GB. Show all posts
Showing posts with label GB. Show all posts
[Friday, January 11, 2008
|
1 comments
]
Popular Posts
- Elgg : The most popular open source social networking platform
- some php questions
- function to check whether the year given is a leap year or not
- php Questions
- Running a perl script from PHP
- Jquery based dynamic adding and removal of html elements.
- php questions
- function to validate the a given credit card based on the card type and based on luhns algorithm
- Mysql query for searching a value, add weightage on the number of occurances and sort based on the weight-age
- Help with codeignitor