加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – ob_flush需要很长时间才能执行

发布时间:2020-12-13 16:31:28 所属栏目:PHP教程 来源:网络整理
导读:在我的网站(使用drupal运行)中,ob_flush功能需要很长时间(10到100秒之间)才能执行.我怎么知道为什么?什么可能导致这么长时间? 尝试这个: ob_start();//Your code to generate the output$result = ob_get_contents(); //save the contents of output buff
在我的网站(使用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;

它对我来说很快.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读