huang-yi / aliyun-oss
Unofficial Aliyun OSS SDK for PHP
0.1.0
2018-09-12 06:54 UTC
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-12-12 21:54:15 UTC
README
This package provides an unofficial Aliyun OSS SDK for PHP.
Usage
<?php require __DIR__ . '/vendor/autoload.php'; use HuangYi\AliyunOss\OssClient; $bucketName = 'bucket'; $endpoint = 'oss-cn-hangzhou.aliyuncs.com'; $accessKeyId = 'access_key_id'; $accessKeySecret = 'access_key_secret'; $client = new OssClient($bucketName, $endpoint, $accessKeyId, $accessKeySecret); // Service APIs $client->service->getService(); // Bucket APIs $client->bucket->getBucket(); // Object APIs $client->object->putObject('new-object', 'contents');