I am trying to execute a program using a system call inside a php file like so:
$newname = 'C:\Users\Jack\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);
For some reason, the program enters an infinite loop (the browser never stops loading). I have tried the command manually and it works perfectly (tak开发者_如何学Pythones about 2 sec to complete) but when executing it with a php file doesn't work.
use the backtick(`) symbol to wrap around the command you want to run.
精彩评论