note 22866 deleted from function.disk-total-space by aidan
| From: | aidan@php.net | Date: | Wed, 13 Jul 2005 03:19:52 +0000 |
| Subject: | note 22866 deleted from function.disk-total-space by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91862@lists.php.net to get a copy of this message | ||
Note Submitter: tnugster at yahoo dot com
----
I had trouble with getting the right size of my disk (on a linux server, dunno what kind of). I
fixed it this way: (copy paste of my code)
//Note: Diskspace is calculated this way : diskspace / ((1024 * 1024 * 1024)) / 4) The / 4 is needed
to get the proper values.
$df = floor(diskfreespace(".") / 268435456);
$total = floor(disk_total_space(".") / 268435456);
$used = $total - $df;
END
The / 4 did it for me, really weird but hey, it works now :)