A5下载文章资讯

分类分类

2015年安装ECSHOP出现错误Redefining already defined constructor for class

2015-05-26 10:14作者:sa

从网上找到的一个解决方法,ecshop是不是快费了,不更新了,现在安装会出现很多问题。

function captcha($folder = '', $width = 145, $height = 20)

{

if (!empty($folder))

{

$this->folder = $folder;

}

$this->width = $width;

$this->height = $height;

/* 检查是否支持 GD */

if (PHP_VERSION >= '4.3')

{

return (function_exists('imagecreatetruecolor') || function_exists('imagecreate'));

}

else

{

return (((imagetypes() & IMG_GIF) > 0) || ((imagetypes() & IMG_JPG)) > 0 );

}

}

把上面的代码移动到 __construct 后面

function __construct($folder = '', $width = 145, $height = 20)

{

$this->captcha($folder, $width, $height);

}

 

展开全部

相关

说两句网友评论
    我要跟贴
    取消