function get_line($file_name,$start,$limit){
$f = new SplFileObject($file_name,"r+");
$f -> seek($start);
$ret = "";
for($i = 0; $i<$limit; $i++ ){
$ret.=$f->current()."<br/>";
$f->next();
}
//$limit++;
return $ret;
$f = new SplFileObject($file_name,"r+");
$f -> seek($start);
$ret = "";
for($i = 0; $i<$limit; $i++ ){
$ret.=$f->current()."<br/>";
$f->next();
}
//$limit++;
return $ret;
}
//调用函数
echo get_line("index.txt",1,5);