Created
January 25, 2018 09:19
-
-
Save picasso250/8cea4a3a3d42baf2de74c0e4692bd575 to your computer and use it in GitHub Desktop.
tail for web
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$f = isset($_GET['f']) ? $_GET['f'] : ''; | |
if (!$f) { | |
die("plz specify f"); | |
} | |
if (!is_file($f)) | |
die("$f is not a file"); | |
header("Content-Type:text/plain;charset=UTF-8"); | |
$output = shell_exec("tail -n 20 $f"); | |
echo "$output"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment