PHP code example of calchen / flysystem-aliyun-oss

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

    

calchen / flysystem-aliyun-oss example snippets


$this->app->register(\Calchen\Flysystem\AliyunOss\AliyunOssServiceProvider::class);

Calchen\Flysystem\AliyunOss\AliyunOssServiceProvider::class,

$app->register(Calchen\Flysystem\AliyunOss\AliyunOssServiceProvider::class);

'oss' => [
    'driver' => 'oss',
    'access_id' => env('ALIYUN_ACCESS_KEY_ID'),
    'access_key_secret' => env('ALIYUN_ACCESS_KEY_SECRET'),
    'bucket' => env('ALIYUN_OSS_BUCKET'),
    'endpoint' => env('ALIYUN_OSS_ENDPOINT'),
    'cdn_base_url' => env('ALIYUN_OSS_CDN_BASE_URL'),  // 可选
    'prefix' => '',                                    // 可选
],