note 74378 added to function.shell-exec

From: Date: Sun, 08 Apr 2007 17:43:27 +0000
Subject: note 74378 added to function.shell-exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-125222@lists.php.net to get a copy of this message
Got it! That was a "how does the windows scripting host work" problem. Here's the answer: <?php $runCommand = "C:\\WINDOWS\\system32\\shutdown.exe -t:30"; //Wrong by purpuse to get some good output $WshShell = new COM("WScript.Shell"); $output = $WshShell->Exec($runCommand)->StdOut->ReadAll; echo "<p>$output</p>"; ?> ---- Server IP: 212.124.37.9 Probable Submitter: 62.104.185.116 ---- Manual Page -- http://www.php.net/manual/en/function.shell-exec.php Edit -- https://master.php.net/note/edit/74378 Del: integrated -- https://master.php.net/note/delete/74378/integrated Del: useless -- https://master.php.net/note/delete/74378/useless Del: bad code -- https://master.php.net/note/delete/74378/bad+code Del: spam -- https://master.php.net/note/delete/74378/spam Del: non-english -- https://master.php.net/note/delete/74378/non-english Del: in docs -- https://master.php.net/note/delete/74378/in+docs Del: other reasons-- https://master.php.net/note/delete/74378 Reject -- https://master.php.net/note/reject/74378 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125222) next »