我尝试使用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
的部分,则定义了该类