note 109312 added to function.disk-total-space

From: Date: Thu, 05 Jul 2012 09:38:38 +0000
Subject: note 109312 added to function.disk-total-space
Groups: php.notes 
Request: Send a blank email to php-notes+get-189036@lists.php.net to get a copy of this message
I really loved stierguy1's function for its simplicity and powerfullness. But one thing just anoys me here, none of these functions provide size in octets units. As it's more used than bits, at least here in France, i just post my tiny modifications which allow to have octets based sizes. <?php function roundsize($size) { $i=0; $iec = array("O", "Ko", "Mo", "Go", "To"); while (($size/1000)>1) { $size = $size/1000; $i++; } return(round($size,1)." ".$iec[$i]); } ---- Server IP: 195.221.21.36 Probable Submitter: 2a01:e35:2e21:9830:226:bbff:fe0b:362e ---- Manual Page -- http://www.php.net/manual/en/function.disk-total-space.php Edit -- https://master.php.net/note/edit/109312 Del: integrated -- https://master.php.net/note/delete/109312/integrated Del: useless -- https://master.php.net/note/delete/109312/useless Del: bad code -- https://master.php.net/note/delete/109312/bad+code Del: spam -- https://master.php.net/note/delete/109312/spam Del: non-english -- https://master.php.net/note/delete/109312/non-english Del: in docs -- https://master.php.net/note/delete/109312/in+docs Del: other reasons-- https://master.php.net/note/delete/109312 Reject -- https://master.php.net/note/reject/109312 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#189036) next »