php imagecreate图片生成代码
来源:互联网 发布:淘宝精品下载 编辑:程序博客网 时间:2024/05/02 04:39
f(isset($gd) && $gd==1&& $txt)
{
header ("Content-type: image/png");
$txt = urldecode(phpcms_auth($txt, 'DECODE',AUTH_KEY));
$imageX = strlen($txt)*9;
$im = @imagecreate ($imageX, 16) or die ("CannotInitialize new GD image stream");
$bgColor =ImageColorAllocate($im,255,255,255);
$white=imagecolorallocate($im,234,185,95);
$font_color=imagecolorallocate($im,0x00,0x00,0x00);
$fontfile =PHPCMS_ROOT."include/fonts/simfang.ttf";
if(file_exists($fontfile)&&!preg_match('/([a-z0-9@.])/',$txt))
{
$txt =iconv("GB2312","UTF-8",$txt);
ImageTTFText($im, 10, 0, 0, 12,$font_color, $fontfile, $txt);
}
else
{
$fonttype =intval($fonttype);
imagestring ($im, $fonttype, 0,0,$txt, $font_color);
}
imagepng ($im);
imagedestroy ($im);
}
{
}
0 0
- php imagecreate图片生成代码
- PHP生成IP地址图片的代码
- php生成验证码图片代码
- php生成验证码图片代码
- 随机字符串生成图片 PHP代码
- PHP背景水印图片生成代码
- 简单的php代码生成验证图片
- [PHP实例] php生成圆角图片代码
- php imagecreate调用imagecolorallocate无法改变颜色
- php下让文本生成图片的代码
- 【代码】PHP 生成GIF动画实现动态图片验证码
- PHP 生成验证码
- PHP生成图片缩略图
- PHP生成图片缩略图
- php 动态生成图片
- PHP图片生成缩略图
- PHP生成图片缩略图
- PHP生成图片
- php 模仿蜘蛛抓取内容并分析
- php 读取指定字符中间内容代码
- php 过滤非法字符 与过滤html js c…
- 在Ubuntu上下载Google Android4.4源码
- 防止php写入mysql数据库信息为乱码…
- php imagecreate图片生成代码
- PHP url 加密解密函数
- php.ini禁止 phpinfo()不运行方法
- php mysql防止sql注入详细说明
- 分类按照拼音第一字母排序显示实现
- 光流法简单介绍
- 如何防止网站被采集
- Candy
- 6个让人感动的小故事