【发布时间】:2016-10-05 05:19:34
【问题描述】:
我已将 ColorsOfImage PHP class from humanmade 作为新库包含在我的 Codeigniter 中。
现在当我在控制器中加载库时,我可以毫无问题地使用该类的功能,但是在加载库时总是出现以下错误,即__construct中的$image函数为空!?
这里是类的__construct函数:
public function __construct( $image, $precision = 10, $maxnumcolors = 5, $trueper = true ) {
$this->image = $image;
$this->maxnumcolors = $maxnumcolors;
$this->trueper = $trueper;
$this->getImageSize();
$this->precision = $precision;
$this->readPixels();
$this->_excluded_colors[] = $this->getBackgroundColor();
}
【问题讨论】:
标签: php codeigniter class