imagemagick已安装在我的系统上(智能提示...)
我下载了一个kohana镜像驱动程序(here)并将其放入kohana模块文件夹中。
然后我在我的bootstrap.php中,在Kohana::modules数组中添加了:
'kohana-imagemagick-driver' => MODPATH.'kohana-imagemagick-driver',在控制器中,我尝试使用以下命令调用它:
$image = new Kohana_Image_Imagick($path . $filename);但是我得到了这个错误:
Kohana_Exception [ 0 ]: Imagick is not installed, or the extension is not loaded发布于 2011-11-21 07:42:35
看起来你没有安装PHP imagick扩展。您可以像这样安装该扩展(在debian系统上):
apt-get install php5-imagick在3.2中存在imagemagick驱动程序的情况下,为什么还要使用第三方模块?
在Kohana 3.2中,有几种方法可以启用imagemagick驱动:
在您的bootstrap.php中,添加:
Image::$default_driver = 'imagick';或者,将驱动程序字符串作为工厂方法的参数传入
Image::factory($file, 'imagick');或者,扩展image类:例如,在file: application/classes/image.php中
abstract class Image extends Kohana_Image {
public static $default_driver = 'imagick';
}https://stackoverflow.com/questions/8205302
复制相似问题