Pregunta

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?

¿Fue útil?

Solución

I guess it's “php.exe” that you should use.

LIKE:

  1. open windows console

  2. 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,

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top