note 112257 deleted from function.exec by felipe

From: Date: Thu, 04 Jul 2013 12:56:26 +0000
Subject: note 112257 deleted from function.exec by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-195455@lists.php.net to get a copy of this message
Note Submitter: Armando AT avilas org ---- After trying extensively to make exec() work with various windows apache mysql php servers i found one that works flawlessly called ampps, and wrote this script that lets you run command prompt commands from a browser. You can essentially run ipconfig, ping, tasklist or any command you normally would sitting in front of your computer running command prompt (cmd). Im running this on a windows 7 32 box using Softaculous AMPPS <form action="" method="post"> <textarea name="code" cols="50" rows="10"></textarea><br> <input type="submit" name="submit" value="Execute"> </form> <?php if (isset($_POST['submit'])){ $code = $_POST['code']; exec("$code", $output); echo '<pre>'; print_r($output); echo '</pre>'; } ?>

« previous php.notes (#195455) next »