note 40379 deleted from function.disk-free-space by nlopess
| From: | nlopess@php.net | Date: | Tue, 02 Mar 2004 15:20:17 +0000 |
| Subject: | note 40379 deleted from function.disk-free-space by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66107@lists.php.net to get a copy of this message | ||
Note Submitter: legweg@free.fr
----
An easy way to control your local HDs (Giga-octet).
<?
function HDspc($HDisk)
{
$dir="$HDisk:\\";
$total = disk_total_space($dir) or die("Can't connect to ".$HDisk.":\\
!<br>\n");
$free = disk_free_space ($dir);
$used = $total - $free;
$HD[0] = round($total/(1024*1024*1024),2);
$HD[1] = round( $used/(1024*1024*1024),2);
$HD[2] = round( $free/(1024*1024*1024),2);
echo "<br> ".$HDisk.":\\ <br>\n";
Foreach($HD as $value)
{echo $value." Go.<br>\n";}
}
HDspc("c");
HDspc("d");
?>
legweg ^_^