最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php生成图形验证码
时间:2022-06-24 21:13:22 编辑:袖梨 来源:一聚教程网
$;
$;
//创建背景图
$im = ImageCreateTrueColor($width, $height);
//分配颜色
$white = ImageColorAllocate ($im, 255, 255, 255);
$blue = ImageColorAllocate ($im, 0, 0, 64);
//绘制颜色至图像中
ImageFill($im, 0, 0, $blue);
//绘制字符串:Hello,PHP
ImageString($im, 10, 100, 120, 'Hello,PHP', $white);
//输出图像,定义头
Header ('Content-type: image/png');
//将图像发送至浏览器
ImagePng($im);
//清除资源
ImageDestroy($im);
?>
相关文章
- 鸣潮椿怎么养-鸣潮椿培养攻略 08-09
- 无限暖暖骑自行车怎么跳跃-无限暖暖骑自行车跳跃方法 08-09
- 崩坏星穹铁道忘归人遗器选择建议-崩坏星穹铁道忘归人遗器推荐 08-09
- 《夺宝奇兵古老之圈》新手入门指南 动作系统介绍及探索解谜指南 08-09
- 《QQ》看点小区进入方法 08-09
- windows11动画效果怎么关闭 win11关闭特效和动画的步骤 08-09