I am trying to make this php code echo the % of space used. (%/100)
It doesn't work.
function roundsize($size){
$i=0;
$iec = array("B", "Kb", "Mb", "Gb", "Tb");
while (($size/1024)>1) {
$size=$size/1024;
$i++;}
return(round($size,1)." ".$iec[$i]);}
$user = $_COOKIE['usernamm'];
$web = file_get_contents("system/web_$user.txt");
$space = disk_total_space("$web/");
$space = $space;
$space = roundsize($space);
echo "$space%";