Changeset 14 for global.php
- Timestamp:
- Oct 14, 2008, 9:24:18 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
global.php
r13 r14 157 157 } 158 158 159 $UnitNames = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB'); 160 161 function HumanSize($Value) 162 { 163 global $UnitNames; 164 165 $UnitIndex = 0; 166 while($Value > 1024) 167 { 168 $Value = round($Value / 1024); 169 $UnitIndex++; 170 } 171 return($Value.' '.$UnitNames[$UnitIndex]); 172 } 173 159 174 ?>
Note:
See TracChangeset
for help on using the changeset viewer.