From 2b2ea121cee7b0f1cd3c44bae979dc7951d4b577 Mon Sep 17 00:00:00 2001 From: zsx Date: Tue, 25 Aug 2015 18:17:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=90=E4=BA=9B=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8Bfilesize=E4=BC=9A=E5=87=BA=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/function/file.function.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/function/file.function.php b/lib/function/file.function.php index 75ab376..ba3c6fe 100755 --- a/lib/function/file.function.php +++ b/lib/function/file.function.php @@ -50,8 +50,9 @@ function iconv_system($str){ } function get_filesize($path){ - return abs(sprintf("%u",filesize($path))); -} + // 某些情况下filesize会出错 + @$ret = abs(sprintf("%u",filesize($path))); + return (int)$ret;} /** * 获取文件详细信息 * 文件名从程序编码转换成系统编码,传入utf8,系统函数需要为gbk