Running a Python script from PHP
问题 I'm trying to run a Python script from PHP using the following command: exec('/usr/bin/python2.7 /srv/http/assets/py/switch.py arg1 arg2'); However, PHP simply doesn't produce any output. Error reporting is set to E_ALL and display_errors is on. Here's what I've tried: I used python2 , /usr/bin/python2 and python2.7 instead of /usr/bin/python2.7 I also used a relative path instead of an absolute path which didn't change anything either. I tried using the commands exec , shell_exec , system .