【发布时间】:2015-06-08 18:31:53
【问题描述】:
我想从 PHP 中调用 Python 文件。 我试过这个:
exec('C:\Python34\python.exe ./python/genereBonDeCommande.py');
但它不起作用。 在我的 Python 文件中,我有这个:
fichier = open(repertoire+"C:/Program Files/EasyPHP-DevServer-14.1VC9/data/localweb/projects/Administration/bonsDeCommandes" + nom_fichier, "No13");
fichier.write('hello');
那我如何在 PHP 中调用 Python 文件呢?
【问题讨论】:
-
以下链接可能对您有所帮助。 stackoverflow.com/questions/19735250/…
-
如何检查它是否调用了文件? @deepu