这是怎么做的.您告诉浏览器读取输出的前N个字符,然后关闭连接,同时脚本一直运行直到完成.
原文链接:https://www.f2er.com/php/130847.html<?PHP ob_end_clean(); header("Connection: close"); ignore_user_abort(); // optional ob_start(); echo ('Text the user will see'); $size = ob_get_length(); header("Content-Length: $size"); ob_end_flush(); // Will not work flush(); // Unless both are called ! // At this point,the browser has closed connection to the web server // Do processing here include('other_script.PHP'); echo('Text user will never see'); ?>