I want to execute some command using php, like exec()
function or system()
function.
But the default cmd.exe
was denied. There is another cmd.exe in 'E:\web\', I want to execute command using 'E:\web\cmd.exe',what should I use exec()
function or system()
function?
I guess it's “php.exe” that you should use.
LIKE:
open windows console
XXX> /PATH_TO_YOUR_PHP_BIN/php /PATH_TO_YOUR_SCRIPT_FILE/somescript.php
you can set your PHP_BIN_PATH as environment variable for convenience,