I have a PHP file which calls Python file. Below is my PHP file contents -
<?php
exec('python print_file.py');
?>
It calls print_file.py which is my python file. Below is my python file contents -
file = open(r'C:\Users\Pavan R\Desktop\expenditures.txt', 'r')
print(file.read())
I want the file contents read in my python code to be displayed on my web browser. Problem is that the webpage doesn't display anything. I've googled a lot but failed to solved this. Is there any extension which I should download? Something like PECL Python?