2011-03-08 37 views
1
系统调用

我试图使用PHP文件,像这样的内部系统调用执行程序:执行程序与PHP

$newname = 'C:\Users\Farzad\Desktop\upload\test.ppt' ; 
$program = '"C:\Program Files (x86)\Softinterface, Inc\Convert PowerPoint\ConvertPPT"'; 
$input = ' /S "'. $newname .'"' 
$destination = ' /T "C:\Users\Jack\Desktop\upload\\"'; 
$switch = ' /C 18'; 
$command = $program . $input . $destination . $switch; 
system($command); 

出于某种原因,该程序进入无限循环(浏览器就不会停止加载)

回答

1

由于system是一个阻塞函数,我猜测它只是在等待您执行的命令完成运行。这不是一个无限循环。

+0

简单的测试方法是直接从命令行运行它。 – 2011-03-08 02:19:29

+0

直接从命令行提示符运行它不会太长。 – 2011-03-08 02:28:33