note 22866 added to function.disk-total-space

From: Date: Tue, 02 Jul 2002 18:08:49 +0000
Subject: note 22866 added to function.disk-total-space
Groups: php.notes 
Request: Send a blank email to php-notes+get-32512@lists.php.net to get a copy of this message
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 :) -- http://www.php.net/manual/en/function.disk-total-space.php http://master.php.net/manage/user-notes.php?action=edit+22866 http://master.php.net/manage/user-notes.php?action=delete+22866 http://master.php.net/manage/user-notes.php?action=reject+22866

« previous php.notes (#32512) next »