Oss: Object storage service Functions: 1. Avatars, files and data storage have low requirements on real-time data. Different from redis the memory store https://help.aliyun.com/document_detail/31818.html?spm=a2c4g.11186623.6.552.eee75afecvOEfk PHP - SDK: https://help.aliyun.com/document_detail/32099.html?spm=a2c4g.11186623.6.998.7e94f2eevxYBMB usage: add and delete (API) reference document summary: A bucket is like a database, with special accessKeyId, accessKeySecret, and bucket; The administrator needs to assign different permissions to different accessKeyIds. Problem: putObject() writes data to the Archive storage type by default. It needs to be unfrozen when retrieving data. Comparison of oss storage types: https://blog.csdn.net/z136370204/article/details/108826798 $accessKeyId = '*** *** ***' $accessKeySecret = '*** *** ***' $endpoint = '* * * * * * * * *' $bucket = '* * * * * * * * *' / / set the file name. $object = "uid_b6f9c8c02851ceb4fa914baa8d9299fe.txt"; $content = 1; $options = [ OssClient::OSS_HEADERS => [ 'x-oss-storage-class' => OssClient::OSS_STORAGE_STANDARD, ] ]; try { $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); $ossClient->putObject($bucket, $object, $content, $options); }catch (\Exception $exception) { echo "<pre>"; print_r($exception->getMessage()); exit; }Copy the code