I have a python script that does some processing on images and gives me text, the script works fine in the console. Now I want to display the same text using php in a browser.
When I use the code below, I get the correct values ββin the php variables $ f and $ v when I explicate the code from the console, but when I execute the code from the browser, I don't get any value in the php variables
exec('python /var/www/abc/abc.py', $f, $v); echo $f; echo $retval;
In python script: I have something like this
code... code... ...... #in the end print text sys.stdout.flush()
How to get print values ββin python script in my php variables?
Elvis source share