开发者

executing a program with system call in PHP

开发者 https://www.devze.com 2023-02-15 05:08 出处:网络
I am trying to execute a program using a system call inside a php file like so: $newname = \'C:\\Users\\Farzad\\Desktop\\upload\\test.ppt\' ;

I am trying to execute a program using a system call inside a php file like so:

$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\\"';
$开发者_如何学JAVAswitch = ' /C 18';
$command = $program . $input . $destination . $switch;
system($command);

For some reason, the program enters an infinite loop (the browser never stops loading)


Since system is a blocking function, I'm guessing that it is simply waiting for the command you executed to finish running. It's not in an infinite loop.

0

精彩评论

暂无评论...
验证码 换一张
取 消