문제

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 ?

도움이 되었습니까?

해결책

shell_exec("command 1>log 2>&1 &");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top