i'm using php in apache on CentOS. i'm need to serve users, that they can delete big files by click. trying to use shell_exec. but its not run in the background. it runs and make the user wait.
my command :
$D_command="rm -rf videos/'$Mdelete'";
shell_exec($D_command);
thanks!
ass & at the end of the command.
$D_command="nohup rm -rf videos/'$Mdelete' > /log/deletedfile.log 2>&1 &";
$PID = shell_exec("nohup $Command 2> /dev/null & echo $!");
http://php.net/manual/en/function.shell-exec.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With