Class' League \ Glide \ ServerFactory'找不到

时间:2016-11-10 08:03:33

标签: php codeigniter composer-php

我尝试使用League Glide来展示我的图片,这是我的代码:

require(APPPATH.'vendor/autoload.php');
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;

function league_image(){
    $array = array(
      'source' => new Filesystem(new Local(realpath(APPPATH.'../../images'))),
      'cache' => new Filesystem(new Local(realpath(APPPATH.'../../images/cache/'))),
   );

    $server =  League\Glide\ServerFactory::create(
       $array;
    );
    $server->setSourcePathPrefix('source');
    $server->setCachePathPrefix('cache');

    return $server;
}

我有滑动文件夹,使用zip而不是将其移动到vendor

我得到了以下错误:

  

致命错误:Class 'League\Glide\ServerFactory' not found in C:\xampp\htdocs\deal\application\helpers\image_helper.php on line 106   A PHP Error was encountered

     

严重程度:Error

     

消息:Class 'League\Glide\ServerFactory' not found

     

文件名:helpers/image_helper.php

     

行号:106

     

回溯:

你可以指导我这个错误是怎么显示的吗?在phpstrom中,如果Ctrl+click并且我将转到ServerFactory的部分

,则定义了该类

0 个答案:

没有答案