欢迎访问我的生活博客 http://jansfer.com

php读取大于2G文件解决方法

上一篇 / 下一篇  2007-04-18 11:07:15 / 个人分类:LAMP

Functions fail on large files (filesize,is_file,is_dir)

Description:
------------
Error:
(errno=75 - Value too large for defined data type)

Functions:
is_file
is_dir
filesize

Premise:
size of file is greater than 2GB.

A workaround for this is:

$filesize=exec("ls -l '$yourfile' | awk '{print $5}'");

function is_dir_LFS($path){
return (('d'==substr(exec("ls -dl '$path'"),0,1))?(true):(false));
}


from:
http://bugs.php.net/bug.php?id=27792

TAG: PHP php filesize is_file is_dir

引用 删除 Guest   /   2007-08-21 15:53:53
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar