PHP code example of cheungq / luya-aliyun-oss

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

    

cheungq / luya-aliyun-oss example snippets


'components' => [
   'storage' => [
       'class' => 'luya\aliyun\AliyunOSS',
       'accessKeyId' => 'xxxxx', // 阿里云OSS AccessKeyID
       'accessKeySecret' => 'xxxx', // 阿里云OSS AccessKeySecret
       'bucket' => 'xxx', // 阿里云的bucket空间
       'domain' => 'xxx', // 自己解析的域名,如果没有可填endPoint带http或者https
       'pathPrefix' => 'xxx', // 文件夹名称
       'endPoint' => 'xxx', //endPoint  如oss-cn-hangzhou.aliyuncs.com
   ]
]