"; while (-1 !== fseek($fp, $pos, SEEK_END)) { $char = fgetc($fp); if (PHP_EOL == $char) { $msg .= $currentLine; $currentLine = ''; } else { $currentLine = $char . $currentLine; } $pos--; $idx++; if ($idx > 1000) { break; } } $msg .= ""; return $msg; } function index() { echo $this->read_log("log-order-regonline.log"); } }