lokielse/aliyun-oss

Aliyun OSS SDK for PHP

v2.1.1 2015-12-20 14:32 UTC

This package is auto-updated.

Last update: 2024-03-27 21:10:25 UTC


README

Latest Version on Packagist Software License Total Downloads

Aliyun OSS SDK for PHP

Installation

$ composer require lokielse/aliyun-oss

Usage

$accessKeyId = "<your_access_key_id>"; ;
$accessKeySecret = "<your_access_key_secret>";
$endpoint = "http://oss-cn-hangzhou.aliyuncs.com";

$client = new OSSClient($accessKeyId, $accessKeySecret, $endpoint);

$bucket = "<your_bucket_name>";
$object = "doc/dest_demo_01.txt";
$content = "Hello, OSS!";

$client->putObject($bucket, $object, $content);

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.