shell_exec("command 1>log 2>&1 &");
execute linux command background in php
-
18-10-2022 - |
Domanda
I need to execute a command in linux by using php and it should meet following requirement.
- should create log file
- should run as background
I know how to do it separately,
with log file :
shell_exec("command 1>log 2>&1");
as background:
shell_exec("command /dev/null 2>&1 &");
My question is how to do it together ?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow