<?php
//This is a more readable way of viewing the returned float
// $Bytes contains the total number of bytes on "/"
$Bytes = disk_total_space("/");
function dataSize($Bytes)
{
$Type=array("", "kilo", "mega", "giga", "tera");
$counter=0;
while($Bytes>=1024)
{
$Bytes/=1024;
$counter++;
}
return("".$Bytes." ".$Type[$counter]."bytes");
}
?>