note 74378 deleted from function.shell-exec by cmb

From: Date: Sun, 14 Jul 2019 11:35:35 +0000
Subject: note 74378 deleted from function.shell-exec by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211592@lists.php.net to get a copy of this message
Note Submitter: d-skyman at gmx dot de ---- 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>"; ?>

« previous php.notes (#211592) next »