PHP and shell_exec

前端 未结 6 1188
余生分开走
余生分开走 2021-01-22 14:06

I have a PHP website and I would like to execute a very long Python script in background (300 MB memory and 100 seconds). The process communication is done via database: when th

6条回答
  •  旧巷少年郎
    2021-01-22 14:58

    shell_exec returns a string, if you run it alone it won't produce any output, so you can write:

    $output = shell_exec(...);
    print $output;
    

提交回复
热议问题