I would like to call a Python file from within PHP. I've tried this :
exec('C:\Python34\python.exe ./python/genereBonDeCommande.py');
But it doesn't work. In my Python file I've got this :
fichier = open(repertoire+"C:/Program Files/EasyPHP-DevServer-14.1VC9/data/localweb/projects/Administration/bonsDeCommandes" + nom_fichier, "No13");
fichier.write('hello');
Then how can I call a Python file from within PHP?
Here is the solution, to create a file there is to put this line :
w creates a file if it doesn't exist already and write over if it does exist
instead of this one :