清除缓存区 bug 修复

feat/task1-c-wallet
devil 2020-02-15 21:24:16 +08:00
parent 72a248f523
commit 0149ba3e76
3 changed files with 13 additions and 4 deletions

View File

@ -332,8 +332,11 @@ class FileUtil
Header("Content-Disposition: attachment; filename=".$show_name);
// 清除前面输出的内容
ob_clean();
flush();
if(ob_get_length() > 0)
{
ob_clean();
flush();
}
//一次性将数据传输给客户端
//echo fread($file, filesize($file_path));

View File

@ -61,7 +61,10 @@ class Qrcode
$content = isset($params['content']) ? base64_decode(urldecode(trim($params['content']))) : __MY_URL__;
// 生成二维码并输出页面显示
ob_clean();
if(ob_get_length() > 0)
{
ob_clean();
}
\QRcode::png($content, false, $level, $point_size, $mr);
}

View File

@ -125,7 +125,10 @@ class Verify
$this->KindofSession();
// 输出图像
ob_clean();
if(ob_get_length() > 0)
{
ob_clean();
}
header('Content-Type: image/gif');
imagegif($this->img);