mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-02 05:31:36 +08:00
类不存在的异常不再手动捕获 系统自动捕获
This commit is contained in:
@@ -51,12 +51,8 @@ class Image {
|
||||
public function init($type = 'Gd', $imgname = null){
|
||||
/* 引入处理库,实例化图片处理对象 */
|
||||
$class = '\Think\Image\Driver\\'.ucwords($type);
|
||||
if(class_exists($class)) {
|
||||
self::$im = new $class($imgname);
|
||||
return self::$im;
|
||||
}else{
|
||||
throw new Exception('不支持的图片处理库类型');
|
||||
}
|
||||
self::$im = new $class($imgname);
|
||||
return self::$im;
|
||||
}
|
||||
|
||||
// 调用驱动类的方法
|
||||
|
||||
Reference in New Issue
Block a user