PHP code example of xplqcloud / cos

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

    

xplqcloud / cos example snippets


return [
    //....
    'components' => [
        'cos'=>[
            'class'=>'xplqcloud\cos\Cos',
            'app_id' => 'app_id',
            'secret_id' => 'secret_id',
            'secret_key' => 'secret_key',
            'region' => 'region',
            'bucket'=>'bucket',
            'insertOnly'=>true,
            'timeout' => 200
        ],
    ],
];

php composer.phar