代码如下:
<?php /** * 格式化文件大小 * Edit www.jb200.com */ function format($size) { $sizetext = array(" B", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"); return round($size/pow(1024,($i=floor(log($size,1024)))),2).$sizetext[$i]; } ?>
CopyRight © 2010-2021 脚本学堂 Jb200.com , All Rights Reserved.