“PHP Infinite Loop” Kode Jawaban

PHP Infinite Loop

$interval=60; //minutes
  set_time_limit( 0 );
  $sleep = $interval*60-(time());

  while ( 1 ){
     if(time() != $sleep) {
       // the looping will pause on the specific time it was set to sleep
       // it will loop again once it finish sleeping.
       time_sleep_until($sleep); 
     }
     #do the routine job, trigger a php function and what not.
   }
Weary Whale

PHP loop tak terbatas

//this infinte loop never stops until the if condition became true 
while(1){
			if(/*condition to exit from while*/);break;}
			ob_flush();	
			flush();
			sleep(2);
        	}
Quaint Quoll

Jawaban yang mirip dengan “PHP Infinite Loop”

Pertanyaan yang mirip dengan “PHP Infinite Loop”

Lebih banyak jawaban terkait untuk “PHP Infinite Loop” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya