Why would you want to run exe on local file system?
Can't it be accomplished via pure PHP solution?
evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392
I did some experimenting with Exec.
I had no problem starting a local program with Exec with one exception. If the path name contains a blank, I wasn't able to get it to work. Even if the actual program name contains a blank, it works. One simple example that worked was:
$addr = "c:/Temp/TSP/TSP2.exe";
exec ($addr,$output, $return);
$output has the display output from the program if it is writing to the current window. If it opens in its own window then you see the output there. An example of getting the output from the current window is as follows:
exec("ping google.com", $output, $return);
echo "The command returned $return, and output:\n";
echo "<b>PING </b><pre>";
echo "<pre>";
var_dump($output);
echo "</pre>";
chrishea
Nearly a Posting Virtuoso
1,428 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230