PHP输出缓冲回调产生空白屏幕 [英] PHP output buffering callback yielding blank screen

查看:128
本文介绍了PHP输出缓冲回调产生空白屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是代码:

 ob_start(array(&$dispatcher, 'outputCallback')); 
 include($file);
 ob_end_flush();

 function outputCallback($string) {
    if(ob_get_level() == 1) { 
        $static =& ParserStatic::getInstance();
        return $static->insertToppings($string);
    }
    return false;
  }

问题是当我返回 $ string 它表现正常,但是当它执行
对象分配时,它给出一个空白屏幕。发生了什么问题?

The problem is when I return $string it behaves OK, but when it executes the object assignment, it gives a blank screen. What's going wrong?

推荐答案

您是否尝试检查您的网络服务器的错误日志,看看PHP是否引发错误?这将有助于您确定问题的原因。

Have you tried checking your web server's error log to see if PHP is throwing an error? That should help you identify the cause of the problem.

这篇关于PHP输出缓冲回调产生空白屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆