I am trying to call a PHP file residing on same server as my python script . I just started with python and are not aware of the basics . I have tried with
import subprocess
subprocess.call("php /path/to/your/script.php")
But its giving file now found error how ever when I execute php /path/to/your/script.php its executing properly.
Apart from above I have tried :
cmd = "php and your file name"
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
and variant of subprocess but of no use, any help is much appreciated. I just need to call a PHP API along with some parameters i.e.
xyz.php?name=variable&age=variable2