阅读背景:

base64与图片输出屏幕

来源:互联网 
if ($base64) {
    ob_start();
    // 输出图像
    imagepng($this->_image);
    imagedestroy($this->_image);
    $image_data = ob_get_contents();
    ob_end_clean ();
    $image_data_base64 = "data:image/png;base64,". base64_encode ($image_data);
    $json = new Json();
    $json->S($image_data_base64);
} else {
    header('Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate');
    header('Cache-Control: post-check=0, pre-check=0', false);
    header('Pragma: no-cache');
    header("content-type: image/png");
    // 输出图像
    imagepng($this->_image);
    imagedestroy($this->_image);
}if ($base64) {
    ob_start();
    // 输出图像
    i



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: