close
例子
<?php
echo diskfreespace("C:");
?>
輸出:
209693288558
<?php
$f = diskfreespace("/raid/vhost/www/");
echo HumanSize($f);
function HumanSize($Bytes)
{
$Type=array("", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta");
$Index=0;
while($Bytes>=1024)
{
$Bytes/=1024;
$Index++;
}
return("".$Bytes." ".$Type[$Index]."bytes");
}
?>
輸出:
1.11630124599 terabytes
全站熱搜
留言列表