PHP code example of sevming / aliyun

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

    

sevming / aliyun example snippets




use Sevming\Aliyun\Aliyun;

$aliyun = new Aliyun([
    'access_key_id' => '',
    'access_key_secret' => '',
    'region_id' => '',
    'uid' => '',
    'timezone' => null,
    'mts' => [
        'host' => '',
        'bucket' => '',
        'location' => '',
        'pipeline_id' => null,
    ],
    'oss' => [
        'host' => '',
        'endpoint' => '',
        'is_cname' => false,
        'security_token' => null,
        'request_proxy' => null,
        'bucket' => '',
        'policy' => [
            'effective_time' => 60,
            'dir' => 'test/',
            'size' => 2,
        ]
    ],
]);