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\');
H
I recommend using passthru and handling the output buffer directly:
passthru
ob_start(); passthru('/usr/bin/python2.7 /srv/http/assets/py/switch.py arg1 arg2'); $output = ob_get_clean();