PHP shell_exec command not working in Windows -


i have following code doesn't seem work, works when open command prompt , run command:

<!doctype html> <html> <head> </head> <body> <form action="ping.php" method="post"> <label for="pc_number">provide target pc names (separate ":"): </label> <input type="text" name="pc_number" id="pc_number"> <input type="submit"> </form> <?php if(empty($_post["pc_number"])==false) {     $number = explode(":", $_post["pc_number"]);     foreach($number $pc)     {                 $restart = shell_exec("shutdown /r /m {$pc} /t 0");         echo "restarting {$pc}... <br>\n";         echo $restart;             } } ?> </body> 

how come works in command prompt not when execute via php? trying restart windows pc remotely.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -