setSqlfiledir(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'backup'.DIRECTORY_SEPARATOR.'20191205010418'); do { $result = $recovery->recovery(); echo str_repeat(' ', 1000); //这里会把浏览器缓存装满 ob_flush(); //把php缓存写入apahce缓存 flush(); //把apahce缓存写入浏览器缓存 if ($result['totalpercentage'] > 0) { echo '完成' . $result['totalpercentage'] . '%
'; } } while ($result['totalpercentage'] < 100);