PHP code example of tystuyfzand / flysystem-seaweedfs

1. Go to this page and download the library: Download tystuyfzand/flysystem-seaweedfs 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/ */

    

tystuyfzand / flysystem-seaweedfs example snippets



he = new SeaweedFS\Cache\FileCache('./cache');
$client = new SeaweedFS\SeaweedFS('127.0.0.1:9333', $cache);

$adapter = new SeaweedFS\Filesystem\Seaweed($client, new SeaweedFS\Filesystem\Mapping\CacheMapper($cache));

$filesystem = new League\Flysystem\Filesystem($adapter);

$filesystem->put('test.txt', 'test1234');

echo $filesystem->read('test.txt');