PHP popen pipes becoming null after one iteration -
<12> Worker processes to work on different types of data using popen itemprop = "text">
I'm trying to generate the code here in PHP under my code ... this is very common.
& lt ;? Php set_time_limit (0); $ Worker = array_fill (0, 12, empty); $ CurrChunk = 56; $ Work = true; While ($ work == true) {$ working = false; Foreign currency ($ worker $ as laborer) {If ($ employee == tap) {if ($ currChunk <265) {$ worker = popen ('C: \ php \ php.exe "C: \ users \ Administrator \ desktop \ a flywheel.fp "'. $ CurrChunk,' r '); Echo ("\ r \ n A worker was started on section". $ CurrChunk); $ CurrChunk ++; $ Work = true; }} And (if (FEF ($ employee)) {Pcko ($ employee); $ Worker = null; echo ("one worker ends!")}} Other {FREED ($ employee, 1); $ work = true; }}} Sleep (.01);}? What is happening here that this script only starts continuously to new workers until it is not upto the limit of 265 It ends, then it ends. It does not really wait for the end.
I get the echo to $ worker to Popen after try And I take back the "Resource Ends ID #XXX" which tells me that it is working properly.
I have also tried the echo ing "here! For code that can be executed if the worker is not null ... that code is never executed, even if it should be.
What Is it? I am blind?
foreach A copy of the array Moves to the original array To modify the elements, you need to reference the $ worker :
foreach ($ as laborer & amp; $ Is optional: foreach ($ worker = $ worker = $ worker) {$ worker = $ key] = 'something'; }
Comments
Post a Comment