Heim  >  Artikel  >  php教程  >  解决TP3.2的GIF缩略图生成失败

解决TP3.2的GIF缩略图生成失败

WBOY
WBOYOriginal
2016-06-07 11:41:501127Durchsuche

解决GIF缩略图生成失败(ThinkPHP 3.2 在 PHP5.3.3以上版本)
\ThinkPHP\Library\Think\Image\Driver\Gd.class.php LINE: 128
原因:
GIF.class.php中GIFEncoder和GIFDecoder的构造函数使用类名没有使用__construct,改为__construct就正常了。
错误原因如下:As of PHP 5.3.3, methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn't affect non-namespaced classes.

为方便大家,特提供一个修改好的文件供大家下载!
大家将附件压缩包中的文件 GIF.class.php 解压覆盖到 ThinkPHP库中,
具体位置:
ThinkPHP\Library\Think\Image\Driver\GIF.class.php

附件 GIF.class.zip ( 3.84 KB 下载:215 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn