Reputation: 16754
I wish to run external program with PHP and provide some arguments, like:
exec('C:\\Program Files\\iNFekt\\infekt\\infekt-cmd.exe -S --utf-16 '.$nfoFile, $output, $return_var);
But nothing happens, $output
is empty array, $return_var
is 1
What is my mistake here ?
Upvotes: 2
Views: 57
Reputation: 6693
Use shell_exec
to get the output:
$output = shell_exec('C:\\Program Files\\iNFekt\\infekt\\infekt-cmd.exe -S --utf-16 '.$nfoFile');
From the Manual
:
shell_exec — Execute command via shell and return the complete output as a string
Upvotes: 2