Home  >  Article  >  Backend Development  >  php文字水印有关问题

php文字水印有关问题

WBOY
WBOYOriginal
2016-06-13 10:46:01706browse

求助:php文字水印问题

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?phpheader ("Content-type: image/jpeg");$image="D:\wamp\www\PKSEO\shuiyin\waterImage.gif";//取得图片的大小   $img=GetImageSize($image);   //$img[2] 中存储的是图片的格式   switch($img[2]){       case 1:           [email&#160;protected]($image);           break;    case 2:           [email&#160;protected]($image);           break;    case 3:           [email&#160;protected]($image);           break;   }  //文字水印   $tc=imagecolorallocate($im,255,255,255);//颜色   $str=iconv("gbk","utf-8","新年");//输出内容imagettftext($im,12,0,20,20,$tc,'C:\WINDOWS\Fonts\SIMSUN.TTC',$str);//写入图片imagejpeg($im);imagedestroy($im);?>

我的文件编码是GBK的!是不是什么地方写错了!
望大家多指导!

------解决方案--------------------
图片上面加水印,css也能实现
------解决方案--------------------
函数是不分大小写的,自己写错了怪谁呢?

ImageCreateFormGIF
imagecreatefromgif
------解决方案--------------------
探讨
函数是不分大小写的,自己写错了怪谁呢?

ImageCreateFormGIF
imagecreatefromgif

------解决方案--------------------
具说区分大小写,可是我一直以来写都觉得大小写不影响。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn