我试图运行一个PHP exec命令。它在我的CMD中像一个魅力一样运行,但当我通过PHP尝试时它不会执行任何操作。有人能看到我在这里做错了吗?通过PHP帮助执行命令
谢谢。
<?php
//Command line command
//"C:\Program Files (x86)\PHP\v5.3\php-cgi.exe" "C:\inetpub\wwwroot\dev_site\images\0000\thumbs.php"
//This runs perfectly fine.
echo "Command line execution started<br />";
//This is when $desination is already set to 0000
echo exec("C:\\Program Files (x86)\\PHP\\v5.3\\php-cgi.exe C:\\inetpub\\wwwroot\\dev_site\\images\\$destination\\thumbs.php");
echo "<br />Command line command successful";
//Does not run
?>
相关,[你怎么跑.bat file from PHP?](http://stackoverflow.com/q/835941) – jww 2016-11-15 04:02:00