note 48507 added to function.disk-total-space
| From: | James at osu1 dot php dot net | Date: | Mon, 27 Dec 2004 16:45:21 +0000 |
| Subject: | note 48507 added to function.disk-total-space | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-82350@lists.php.net to get a copy of this message | ||
modified the function above to handle directories like: "my folder" also the explode
should use a tab
<?php
function Du($dir)
{
$du = popen("/usr/bin/du -sk \"$dir\"", "r");
$res = fgets($du, 256);
pclose($du);
$res = explode("\t", $res);
return $res[0];
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.disk-total-space.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48507
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48507&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48507&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48507&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48507&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48507&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48507&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48507&report=yes
Search -- http://master.php.net/manage/user-notes.php