我试图在php文件中执行批处理文件。我使用Apache服务器。 Itried使用FTP客户端以下的方法,但它不工作无法在php中执行批处理文件
PHP代码
echo shell_exec('download.bat');
echo exec('download.bat');
system ("cmd /c download.bat");//Also tried for exec and shell_exec
批处理文件的下载代码
批处理文件
"c:\program files\coreftp\coreftp.exe" -s -O -site mysite -d /Export/*.* -p C:\wamp\www\file\txt
如果我运行它在cmd中或直接运行那么它的工作正常,当我运行它的PHP它只是写或回声批处理文件的代码
download.bat文件位于同一文件夹中。
我也试着打简单的bat文件
start "link" "https://www.google.co.in/?gfe_rd=cr&ei=NzuIVI-FG6aG8Qef44CAAw"
它也没有打电话来此bat文件
它究竟如何_not working_ – RiggsFolly 2014-12-09 18:36:10