How to call a Python Script from PHP?

后端 未结 4 1984
[愿得一人]
[愿得一人] 2020-12-01 10:02

I have some code written in PHP, but I have also developed a script written in Python. Is it possible to call this Python script from the PHP code?

If yes, how can I

4条回答
  •  自闭症患者
    2020-12-01 10:20

    I managed to make simple function PY([parametress], code) for PHP. You may almost include python code to your PHP. You may pass as well some simple input variables to python process. You cannot get any data back, but I believe that could be easily fixed :) Not ok for using at webhosting (potentionally unsafe, system call), I created it for PHP-CLI..

     
    

提交回复
热议问题