PHP code example of xutl / flysystem-aliyun-oss

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

    

xutl / flysystem-aliyun-oss example snippets


// config/app.php

'providers' => [
    '...',
    XuTL\Flysystem\AliyunOss\AliyunOssServiceProvider::class,
];

'oss' => [
    'driver'     => 'oss',
    'access_id'  => env('OSS_ACCESS_ID','your id'),
    'access_key' => env('OSS_ACCESS_KEY','your key'),
    'bucket'     => env('OSS_BUCKET','your bucket'),
    'endpoint'   => env('OSS_ENDPOINT','your endpoint'),
    'prefix'     => env('OSS_PREFIX', ''), // optional
],

    'default' => 'oss'