修复某些情况下filesize会出错问题

pull/25/head
zsx 2015-08-25 18:17:59 +08:00
parent 4b93fd6816
commit 2b2ea121ce
1 changed files with 3 additions and 2 deletions

View File

@ -50,8 +50,9 @@ function iconv_system($str){
} }
function get_filesize($path){ function get_filesize($path){
return abs(sprintf("%u",filesize($path))); // 某些情况下filesize会出错
} @$ret = abs(sprintf("%u",filesize($path)));
return (int)$ret;}
/** /**
* 获取文件详细信息 * 获取文件详细信息
* 文件名从程序编码转换成系统编码,传入utf8系统函数需要为gbk * 文件名从程序编码转换成系统编码,传入utf8系统函数需要为gbk