<?php

$file = fopen("test.txt", "r");

//輸出文本中所有的行,直到文件結束為止。
while(!feof($file))
{
echo fgets($file). "<br />";
}

fclose($file);
?>
輸出:
line1
line2
last line

arrow
arrow
    全站熱搜

    stockwfj3 發表在 痞客邦 留言(0) 人氣()