note 70338 added to function.shell-exec

From: Date: Thu, 12 Oct 2006 12:27:23 +0000
Subject: note 70338 added to function.shell-exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-118444@lists.php.net to get a copy of this message
If you are using a Windows server with IIS, and you try to execture a batch file with shell_exec() function, or his related functions you should do it like this: <? shell_exec("C:\\path\\to\\cmd.exe /c C:\\batchfile.cmd"); ?> Note the parameter /c which says "Carries out the ommand specified by string and then terminates" If you don't add the parameter /c the batch file will not be executed, only the cmd.exe file will. As, also mentiod in these commants, put your cmd.exe file in your php folder, and your windows folder for security reasons. ---- Server IP: 83.137.20.120 Probable Submitter: 80.127.217.138 (proxied: 1.1 SVR-NS01) ---- Manual Page -- http://www.php.net/manual/en/function.shell-exec.php Edit -- https://master.php.net/note/edit/70338 Del: integrated -- https://master.php.net/note/delete/70338/integrated Del: useless -- https://master.php.net/note/delete/70338/useless Del: bad code -- https://master.php.net/note/delete/70338/bad+code Del: spam -- https://master.php.net/note/delete/70338/spam Del: non-english -- https://master.php.net/note/delete/70338/non-english Del: in docs -- https://master.php.net/note/delete/70338/in+docs Del: other reasons-- https://master.php.net/note/delete/70338 Reject -- https://master.php.net/note/reject/70338 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118444) next »