I am trying to run a python3
script using a php
file. I have used php functions like system()
, shell_exec()
, exec()
to run that python3
script but not getting any output on the browser localhost.
I am asking input from the user in a form in php and by using that input as command line argument I am calling a python3
script using the above-mentioned php functions.
Asked
Active
Viewed 51 times
0

Manish
- 11
- 2
-
1Welcome to SO! When posting a question about your code, it's important that you include what you've tried. We gladly help you fix your existing code, but we won't write it all for you. – M. Eriksson May 29 '19 at 09:44
-
Can you provide a sample of the code of PHP you use. Have you enable the errors display of PHP ? – Shim-Sao May 29 '19 at 09:44
-
Possible duplicate of [how to run Python script from php](https://stackoverflow.com/questions/49189730/how-to-run-python-script-from-php) – Ocaso Protal May 29 '19 at 09:45
-
My code is working when I separately run the python3 file but my input in is php variable and I want to pass that variable to the python3 file – Manish May 29 '19 at 10:00