在我的网站(使用 drupal 运行)中,ob_flush
函数需要很长时间(在 10 - 100 秒之间)才能执行。我如何找出原因?是什么导致了这么长时间?
最佳答案
试试这个:
ob_start();
//Your code to generate the output
$result = ob_get_contents(); //save the contents of output buffer to a string
ob_end_clean();
echo $result;
它对我来说运行得很快。
关于php - ob_flush 需要很长时间才能执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13903970/