-
function memConvert($size) {
-
$unit=array(‘B’,'KB’,'MB’,'GB’,'TB’,'PB’);
-
return @round($size/pow(1024,($i=floor(log($size,1024)))),2).’ ‘.$unit[$i];
-
}
php内存换算方式。。
- No comments yet.
- No trackbacks yet.
This entry was posted on Tuesday, April 20th, 2010, 2:56 pm and is filed under PHP语言学习. You can follow any responses to this entry through RSS 2.0. You can leave a response, or trackback from your own site.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jan | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||
Fusion theme by digitalnature | powered by WordPress
Entries (RSS) and Comments (RSS) ^
Recent Comments