我想通过php执行cmd.exe的命令,但在cmd中它正在执行,但在php exec()中它没有执行


I want to execute command of cmd.exe through php but in cmd it is executing but in php exec() it is not executing

我想执行这个命令,但它不是计划任务,而是在cmd中执行的同一个命令。

echo exec('schtasks /create /np /sc minute /mo 1 /tn "TestRail Background Task" /tr "'"start http://localhost/cronjob2/cronjob.php""
');

我通过命令/RU系统执行找到了解决方案

$command='schtasks/create/np/sc minute/mo 1/tn"cronjob2"/tr"''"D:''www''webroot''cronjob2''shellscript.vbs"/RU系统';exec("$command 2>&1",$output);print_r($output);