Reputation: 295
How can we do multiple process in php without using pcntl_fork()?
I google many times but found nothing usefull. My server doesn't support pcntl_fork().
Upvotes: 2
Views: 358
Reputation: 295
I found out that simple way to do that is use exec(). @arkascha thank you so much!
Now we can do multiple process in php and use exit() to return whatever we want from these processes.
Upvotes: 0
Reputation: 42885
If you have php cli available you can use exec() or system() to fork processes. But sometimes a more elegant way is to make http subrequests in background and use the original url target only as controlling instance.
Upvotes: 2