note 13667 modified in function.disk-total-space by aidan
| From: | aidan@php.net | Date: | Wed, 13 Jul 2005 03:19:37 +0000 |
| Subject: | note 13667 modified in function.disk-total-space by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91861@lists.php.net to get a copy of this message | ||
I just did the simple thing -
<?php
function du($dir)
{
$du = popen("/usr/bin/du -sk $dir", "r");
$res = fgets($du, 256);
pclose($du);
$res = explode(" ", $res);
return $res[0];
}
?>
--was--
I just did the simple thing -
function Du($dir)
{
$du = popen("/usr/bin/du -sk $dir", "r");
$res = fgets($du, 256);
pclose($du);
$res = explode(" ", $res);
return $res[0];
}
http://php.net/manual/en/function.disk-total-space.php