## [README of Chinese](https://github.com/aliyun/aliyun-oss-php-sdk/blob/master/README-CN.md)
## Overview
Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring a massive capacity, security, a low cost, and high reliability. You can upload and download data on any application anytime and anywhere by calling APIs, and perform simple management of data through the web console. The OSS can store any type of files and therefore applies to various websites, development enterprises and developers.
## Run environment
- PHP 5.3+.
- cURL extension.
Tips:
- In Ubuntu, you can use the ***apt-get*** package manager to install the *PHP cURL extension*: `sudo apt-get install php5-curl`.
## Install OSS PHP SDK
- If you use the ***composer*** to manage project dependencies, run the following command in your project's root directory:
composer require aliyuncs/oss-sdk-php
You can also declare the dependency on Alibaba Cloud OSS SDK for PHP in the `composer.json` file.
"require": {
"aliyuncs/oss-sdk-php": "~2.0"
}
Then run `composer install` to install the dependency. After the Composer Dependency Manager is installed, import the dependency in your PHP code:
require_once __DIR__ . '/vendor/autoload.php';
- You can also directly download the packaged [PHAR File][releases-page], and
introduce the file to your code:
require_once '/path/to/oss-sdk-php.phar';
- Download the SDK source code, and introduce the `autoload.php` file under the SDK directory to your code:
Buckets are the space that you use to manage the stored objects. It is an object management unit for users. Each object must belong to a bucket. You can create a bucket with the following code:
The OssClient provides the following two types of returned data from interfaces:
- Put and Delete interfaces: The *PUT* and *DELETE* operations are deemed successful if *null* is returned by the interfaces without *OSSException*.
- Get and List interfaces: The *GET* and *LIST* operations are deemed successful if the desired data is returned by the interfaces without *OSSException*. For example,