Posted in PHP onJanuary 09, 2014
$rs = 'README.md'; $fp = fopen($rs, 'r'); fseek($fp,-1,SEEK_END); $s = ''; while(($c = fgetc($fp)) !== false) { if($c == "\n" && $s) break; $s = $c . $s; fseek($fp, -2, SEEK_CUR); } fclose($fp); echo $s; exit;
php获取文件内容最后一行示例
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@