Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
function tailShell($filepath, $lines = 1) {
ob_start();
passthru('tail -' . $lines . ' ' . escapeshellarg($filepath));
return trim(ob_get_clean());
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment