PHP code example of gn-office / flysystem-directcloud

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

    

gn-office / flysystem-directcloud example snippets


use League\Flysystem\Filesystem;
use GNOffice\DirectCloud\Client;
use GNOffice\FlysystemDirectCloud\DirectCloudAdapter;

$client = new Client([$service, $service_key, $code, $id, $password]);
// or
$client = new Client([$service, $service_key, $access_key]);

$adapter = new DirectCloudAdapter($client);

$filesystem = new Filesystem($adapter);