<?php
header("Content-type: image/gif");
//设置画布
$im =imagecreate(915,132);
// 背景设为红色
$background_color = ImageColorAllocate ($im, 255, 255, 255);
// 设置字体颜色为黑色
$col = imagecolorallocate($im, 204, 158, 125);
//字体所放目录
$font="./simhei.ttf";
//写 TTF 文字到图中 字体向图像写入文本 第一个是画布 第二个是字体尺寸 第三个是角度 第四个是x 第五个是y
imagettftext($im,86,0,80,100,$col,$font,"扫码看产品故事");
imagegif($im,'new.gif');
imagedestroy($im);