php exec and shell_exec not working
Posted
by chris
on Stack Overflow
See other posts from Stack Overflow
or by chris
Published on 2009-07-10T04:00:09Z
Indexed on
2010/06/11
5:52 UTC
Read the original article
Hit count: 136
I want to run an exe file on my server and return the output to the browser screen. The exe file takes a input file and then returns data on the screen.
Why is this code not working?
$output = shell_exec('myprogram < INP.DAT');
echo "<pre>" . var_export($output, TRUE) ."</pre>\\n";
It displays "NULL" on the browser screen. I have also tried exec(). There it returns "Array()".
© Stack Overflow or respective owner