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

php文字水印有关问题

WBOY
Release: 2016-06-13 10:46:01
Original
751 people have browsed it

求助: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);?>
Copy after login

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

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

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

ImageCreateFormGIF
imagecreatefromgif

------解决方案--------------------
具说区分大小写,可是我一直以来写都觉得大小写不影响。
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template