时间:2021-07-01 10:21:17 帮助过:9人阅读
stream=fopen("xxx.html");
var str = '';
while(!feof(stream)
{
size+=1024;
str.=fread(stream,size);
}
....
$stream=fopen("test.html","r");
$str = '';
$size=1024;
while(!feof($stream)){
$tmp=fread($stream,$size);
file_put_contents('d:/log.log',$tmp.PHP_EOL,FILE_APPEND);
$str.=$tmp;
$tmp='';
}
fclose($stream);
echo $str;