I am currently trying to create a .php file that displays the output of a python file. Here is what I have so far (that semi works).
test.php
<?php
echo "Results from wordgame.py...";
echo "</br>";
$output = exec('python wordgame.py cat dog');
echo $output;
;?>
Here is what test.php returns...
Results from test.py...
dog
Here is the output from 'wordgame.py cat dog' I get when running it from the command line:
Generated: 2454
Expanded: 83
Revisited: 0
Path:
dog
cog
cag
cat
My question is, how do I get test.php to print out the same thing it prints at the command line? wordgame.py doesn't "return" anything, it just prints the lines once it's found a path between the words. Any and all help is appreciated!