i have wamp installed on windows pc. have python script has following code, supposed run php script located in www of wamp (c:\wamp64\www)
import subprocess subprocess.call("php c:\wamp64\www\index.php")
i tried below did not work also
import subprocess subprocess.call("c:\wamp64\bin\php\php5.6.31\php.exe c:\wamp64\www\index.php")
however, when run python code ipython
following error. (see image)
add full path of php
subprocess.call("c:/wamp64/bin/php/php5.6.31 c:/wamp64/www/index.php")
or add php environment variables. open cmd , type:
set path=%path%;c:\wamp64\bin\php\php5.6.31
Comments
Post a Comment