Hello,
I have script (scriptA.php) that loops through lots of data and makes some operations on each loop. This takes some time to run, around 20-200 secs.
Also, i have another script (scriptB.php) that show statistics about the processes scriptA.php makes.
I run scriptA.php and scriptB.php in their own window. My problem is, scriptB.php does not print statistics results until scriptA.php finishes its processes.
How can I make scriptB.php work even scriptA.php didn't finish its processes?
TIA!
Running 2 scripts at the same time
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
the pcntl_fork() function might be what you're looking for.. take a look in the manual here: http://www.php.net/manual/en/ref.pcntl.php
There are some good tutorials on the net for how to use this function
Cheers,
Kieran
There are some good tutorials on the net for how to use this function
Cheers,
Kieran