<?php
header('content-type:text/html;charset=utf-8'); //解決中文亂碼
$txt_file = 'file.txt'; //讀取文件
$arr_file = file($txt_file); //file()函數返回數組
for($i=0;$i<count($arr_file);$i++){ //循環file函數數組中長度
echo $arr_file[$i];//循環出每行數據
echo "<br/>"; //換行
}
?>