ob_flush需要很长时间才能执行

ob_flush需要很长时间才能执行

问题描述:

在我的网站(运行drupal)中, ob_flush 函数需要很长的时间(介于10到100秒之间)才能执行。我如何找出原因?这么长时间会导致什么?

In my website(running with drupal) the ob_flush function takes a long time(between 10 - 100 secs) to be executed. How do I find out why? What can cause this so long time?

尝试一下:

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;

对我来说运行很快。