Changeset 131 for devel/www/global.php
- Timestamp:
- Jan 5, 2009, 7:40:40 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/www/global.php
r104 r131 8 8 include('config.php'); 9 9 include('database.php'); 10 include('error.php');10 //include('error.php'); 11 11 include_once('code.php'); 12 12 $Database = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password'], $Config['Database']['Database']); … … 61 61 list($Usec, $Sec) = explode(" ", microtime()); 62 62 return ((float)$Usec + (float)$Sec); 63 } 64 65 $UnitNames = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB'); 66 67 function HumanSize($Value) 68 { 69 global $UnitNames; 70 71 $UnitIndex = 0; 72 while($Value > 1024) 73 { 74 $Value = round($Value / 1024, 3); 75 $UnitIndex++; 76 } 77 return($Value.' '.$UnitNames[$UnitIndex]); 63 78 } 64 79
Note:
See TracChangeset
for help on using the changeset viewer.