PHP code example of danhunsaker / flysystem-redis
1. Go to this page and download the library: Download danhunsaker/flysystem-redis library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
danhunsaker / flysystem-redis example snippets
use Predis\Client;
use League\Flysystem\Filesystem;
use Danhunsaker\Flysystem\Redis\RedisAdapter;
$redis = new Client();
$adapter = new RedisAdapter($redis);
$filesystem = new Filesystem($adapter);
use Predis\Client;
use League\Flysystem\Filesystem;
use Danhunsaker\Flysystem\Redis\RedisAdapter;
$redis = new Client([
'scheme' => 'tcp',
'host' => '10.0.0.1',
'port' => 6379,
]);
$adapter = new RedisAdapter($redis);
$filesystem = new Filesystem($adapter);