|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-07-09 14:44 UTC] josh at servebyte dot com
[2013-07-09 17:24 UTC] danbrown@php.net
-Status: Open
+Status: Feedback
[2013-07-09 17:24 UTC] danbrown@php.net
[2013-07-09 17:55 UTC] ryan at rmauger dot co dot uk
-Status: Feedback
+Status: Open
[2013-07-09 17:55 UTC] ryan at rmauger dot co dot uk
[2013-07-09 18:21 UTC] danbrown@php.net
-Status: Open
+Status: Feedback
[2013-07-09 18:21 UTC] danbrown@php.net
[2013-07-09 18:22 UTC] ryan at rmauger dot co dot uk
-Status: Feedback
+Status: Open
[2013-07-09 18:22 UTC] ryan at rmauger dot co dot uk
[2013-07-09 18:27 UTC] danbrown@php.net
[2013-07-09 18:30 UTC] ryan at rmauger dot co dot uk
[2013-10-11 00:57 UTC] bjori@php.net
-Assigned To:
+Assigned To: googleguy
[2013-10-11 00:57 UTC] bjori@php.net
[2013-10-11 11:45 UTC] googleguy@php.net
[2015-08-06 20:57 UTC] cmb@php.net
[2016-05-29 04:44 UTC] googleguy@php.net
-Status: Assigned
+Status: Wont fix
[2016-05-29 04:44 UTC] googleguy@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 19:00:01 2025 UTC |
Description: ------------ Please allow us to report potentially dangerous or irresponsible code examples from the comments, such as the one below, they do nothing for the reputation of PHP, and could end up making their way into production servers of people still learning their way in PHP. Test script: --------------- 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>'; } ?>