how do you read the last line in php and parse out certain columns

后端 未结 3 442
小蘑菇
小蘑菇 2021-01-27 12:02

I am very new to php. I\'d really appreciate all the help here.

I am using sftp to login to a server and get a file. I am only interested in the last line in that file.

3条回答
  •  太阳男子
    2021-01-27 12:55

    $data = explode("\n", $data);
    $last_line = end($data);
    $parts = explode("\t", $last_line);
    

提交回复
热议问题