﹎斑斓的梦ぷ

愿你眼中总有光芒,活成你想要的模样.

导航

Php - 逐行读取文件

PHP逐行读取数据

<?php
$file = fopen("Minot.txt", "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
//feof() check if file read end EOF
while(!feof($file))
{
 //fgets() Read row by row
 echo fgets($file). "<br />";
}
fclose($file);
?>

posted on 2018-05-25 11:45  ﹎斑斓的梦ぷ  阅读(5584)  评论(0编辑  收藏  举报