时间:2021-07-01 10:21:17 帮助过:11人阅读
$handle = fopen ( 'a.txt' , 'r+' );
rewind($handle);
fwrite($handle,"这是第一行\r\n");
fclose ( $handle );
$handle = fopen ( 'a.txt' , 'r+' );
$arr=array();
while($line=fgets($handle)){
$arr[]=$line;
}
fclose ( $handle );
echo end($arr);