PHP code example of takashiki / yii2-cos-flysystem

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

    

takashiki / yii2-cos-flysystem example snippets


'cosFs' => [
    'class' => \takashiki\yii2\flysystem\CosFilesystem::class,
    'app_id' => 'xxx',
    'secret_id' => 'xxx',
    'secret_key' => 'xxx',
    'bucket' => 'xxx',
    'domain' => 'xxx.file.myqcloud.com',
    
    // not necessarily bellow 
    'version' => 'v5',
    'protocol' => 'https',
    'region' => 'ap-shanghai',
    'timeout' => 60,
    'cdn_key' => '',
    'read_from_cdn' => false,
    'encrypt' => false
],