fread ( resource $handle , int $length )
fread() 从文件指针 handle 读取最多 length 个字节。 该函数在遇上以下几种情况时停止读取文件:
$filename = "/usr/local/something.txt"; $handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); fclose($handle);
原文链接:http://www.cnblogs.com/jc2182/p/11790562.html