Running python script from php

前端 未结 1 525
孤独总比滥情好
孤独总比滥情好 2021-01-14 21:22

I am trying to run a python script from php.

exec(\"../cgi-bin/form.py\", $output);
var_dump($output);

I\'m certain the path is correct, an

相关标签:
1条回答
  • 2021-01-14 22:04

    You're literally just typing in the location of the file. You need to tell exec to execute python with that script.

    exec("python ../cgi-bin/form.py", $output);
    
    0 讨论(0)
提交回复
热议问题