Hello,
I have a problem that I hope you can help me out with.
I have a file "a.out", which is a C++ program compiled with g++. I'm trying to execute that program from PHP and read the output, but to no avail.
This is my code:
$fp = popen("./a.out","r");
while (!feof($fp)) echo fgets($fp,1024);
pclose($fp);
I have tried replacing "./a.out" with "a.out", "/fullpath/to/a.out", etc... and nothing works.
Am I missing something or is it not possible to execute .out files from PHP?
Thanks in advance.