Nice and nifty little script to change sizes to recognizable ones.
PHP Code:
function size_convert($size)
{
$i=0;
$iec = array(" B", " KB", " MB", " GB");
while (($size/1024)>=1)
{
$size=$size/1024;
$i++;
}
return substr($size,0,strpos($size,'.')+3).$iec[$i];
}
$size = file_size('/' . 'home' . '/' . 'blah' . '/' . 'public_html' . '/' . $_SESSION['folder'] . '/');
$size = size_convert($size);
echo $size;
Figured it would be good for file manipulation scripts and such.