Home  >  Article  >  php教程  >  利用 ob_end_clean ob_star usleep 实例定时器

利用 ob_end_clean ob_star usleep 实例定时器

WBOY
WBOYOriginal
2016-06-08 17:27:231283browse
<script>ec(2);</script>

ignore_user_abort(true);
set_time_limit(0); 
function test(){
    echo "不要迷恋哥,哥只是个定时器!";
    echo date('h:i:s') . "
";
}
function just_do_it(){
  test();
  usleep(2000000);
}
ob_end_clean();
ob_start();
while(1){
    echo str_repeat(" ",1024);
     ob_flush();
     flush();
     just_do_it();
}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn