<div align="center" style="margin-top: 100px; border: 1px solid; width: 500px; padding-top: 9px;">
<form method="post" action="search.php?action=complited">
<input type="text" name="text" size="40">
<input type="submit" value="grep">
</form>
<?php
if ($_SERVER['REQUEST_URI']=='/search.php?action=complited'){
echo '<pre>';
// Gibt das gesamte Ergebnis des Shell-Befehls „ls“ aus und gibt
// die letzte Zeile der Ausgabe in der Variable $last_line zurück. Speichert den Rückgabewert
// des Shell-Befehls in $retval.
$last_line = system('grep -lr "'.$_POST['text'].'" ./', $retval);
//$last_line = system('ls', $retval);
// Gibt zusätzliche Informationen aus
echo '</pre>';
}
?>
</div>
