Return to Snippet

Revision: 49606
at July 26, 2011 11:49 by mukeshdak


Initial Code
function file_size($size)
{
	$filesizename = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
	return $size ? round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $filesizename[$i] : '0 Bytes';
}

Initial URL
http://dak9.com

Initial Description
for converting size in proper format.

Initial Title
Size Conversion

Initial Tags

                                

Initial Language
PHP