PHP ThinkPHP做文字水印時(shí)提示call an undefined function exif_imagetype()解決方法 本文實(shí)例講述了ThinkPHP做文字水印時(shí)提示call an undefined function exif_imagetype()解決方法。分享給大家供大家參考。具體如下:一、問題描述:ThinkPHP做文字水印 ,今天做一個(gè)電子請?zhí)桶炎8UZ貼到圖片上面,發(fā)現(xiàn)一直報(bào)錯(cuò)是取不到圖片類型,比如gif,jpg等,并提示call an undefined function exif_imagetype()。二、解決方法:出現(xiàn)這個(gè)錯(cuò)誤就是php.in 配置問題,打開即可:打開擴(kuò)展 extension=php_exif.dll 如果再不行就把extension=php_mbstring.dll ,放到extension=php_exif.dll前邊 注意:extension=php_exif.dll 擴(kuò)展要打開 類文件:wptext_html' target='_blank'>class.php代碼如下:復(fù)制代碼 代碼如下: php /* PHP添加文字水印類 V1.0 作者:Yu Tiedun 郵箱: 修改日期:2010-03-07 支持圖片格式:gif, jpg, png 水印的位置自己根據(jù)需要調(diào)整 如能修改得更好,請發(fā)一份給我 */ class WaterPrint { //類開始 public $text, $color, $size, $font, $angle, $px, $py, $im; //要添加的文字 public function GetWpText($text) { $this- text = $text; } //添加文字的顏色 public function GetFtColor($color) { $this- color = $color; } //添加文字的字體 public function GetFtType($font) { $this- font = $font; }