主页
PHP
PHP feof() 函数
demo_func_filesystem_feof
运行 ❯
×
更改方向
保存代码
更改主题
<?php $file = fopen("test.txt","r"); //Output lines until EOF is reached while(! feof($file)) { $line = fgets($file); echo $line. "
"; } fclose($file); ?>
Hello, this is a test file.
There are three lines here.
This is the last line.