Reputation: 3
I want to execute two commands at the same time, I am using
if((bool)@$ip) shell_exec("command1; command2");
it does work but it needs to finish one command and then it will start to do the other command.
Can I have some help please? Thanks
Upvotes: 0
Views: 692
Reputation: 12027
If you put the & symbol at the end of the first command, it will run that command in the background (asynchronously) so that your PHP script will continue to the next line, where you can fire off the next command.
Upvotes: 2