Home > Backend Development > PHP Tutorial > 关于readfile的问题_PHP

关于readfile的问题_PHP

WBOY
Release: 2016-06-01 12:38:54
Original
1338 people have browsed it

有代码如下:
$DOCUMENT_ROOT=$_SERVER['DOCUMENT_ROOT'];
readfile("$DOCUMENT_ROOT/fopen.txt");
fclose($fp);
?>
为什么除了正常显示文本信息,还显示Warning: fclose(): supplied argument is not a valid stream resource in D:\php\test_fgets.php on line 4
如果去掉fclose($fp);这行就没有任何错误提示,请问这是为什么?[PHP]

readfile
file
fpassthru
这些函数不需要用fclose关闭

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template