fget的死循环问题
参见官方文档:http://php.net/manual/en/function.feof.php
"
Warning
If the passed file pointer is not valid you may get an infinite loop, because
feof() fails to return TRUE.
"
可改成:
while (!feof($fp))
{
$re = fgets($fp);
if (false === $re) {
break;
}
$result .= $re;
}
Original issue reported on code.google.com by lingyey...@gmail.com on 28 Sep 2014 at 9:07
Original issue reported on code.google.com by
lingyey...@gmail.com
on 28 Sep 2014 at 9:07