Running a Python script on a PHP server

前端 未结 1 1738
死守一世寂寞
死守一世寂寞 2021-01-18 13:54

I am running a nginx web server, along with PHP-CGI.

I would like to know if it is possible to execute a Python script inside PHP pages, allowing both languages to b

1条回答
  •  鱼传尺愫
    2021-01-18 14:36

    exec will return the output of the shell command, but you still need to echo that to the page. The following code should work for you

    
    
        

    Hello! Here is a message:

    0 讨论(0)
提交回复
热议问题