1. Go to this page and download the library: Download yzh52521/flysystem-upyun 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/ */
yzh52521 / flysystem-upyun example snippets
use League\Flysystem\Filesystem;
use yzh52521\Flysystem\Upyun\UpyunAdapter;
$bucket = 'your-bucket-name';
$operator = 'oparator-name';
$password = 'operator-password';
$domain = 'xxxxx.b0.upaiyun.com'; // 或者 https://xxxx.b0.upaiyun.com
$protocol='https', // 服务使用的协议,如需使用 http,在此配置 http
$adapter = new UpyunAdapter($bucket, $operator, $password, $domain,$protocol);
$flysystem = new Filesystem($adapter);