How can I run several PHP scripts from within a PHP script (like a batch file)?

后端 未结 4 1809
我在风中等你
我在风中等你 2021-01-05 09:50

How can I run several PHP scripts from within another PHP script, like a batch file? I don\'t think include will work, if I understand what include is doing; because each o

4条回答
  •  被撕碎了的回忆
    2021-01-05 10:51

    If you need any return results from those scripts, you can use the system function.

    $result = system('php myscript.php');
    $otherresult = system('php myotherscript.php');
    

提交回复
热议问题