Jump to content

Need help with While loops and frames


BreakBreak

Recommended Posts

I'm trying to keep a page open and looping for testing purposes of a further project.

I have 4 frames

They are all running while loops with a sleep(1) in them

They are all doing the following:

$i = 2;
$z = 1;
while($i > 1){

echo "$z second <br>";
sleep(1);
$z++;
}

However, for some perculiar reason, three of them stop SOMETIMES after 20 or so seconds, whilst the one to the farthest right carries on.

What baffles me is that SOME of them only stop SOMETIMES.

Another confusion, once it ran with all four of them counting for over 30 minutes and showed no sign of stopping.

PHP is NOT in safe mode.


---------

Please help me as this is slowing me down hugely and i need to find a solution, fast.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.