Sample code for common OSS SDK for PHP 1.0 operations.
OSS SDK for PHP 2.0
-
OSS SDK for PHP 2.0 (alibabacloud-oss-php-sdk-v2) is a major rewrite of OSS SDK for PHP 1.0 (aliyun-oss-php-sdk).
-
OSS SDK for PHP 2.0 simplifies identity authentication, automatic retries, and error handling, allowing you to access OSS through API operations without complex programming.
-
OSS SDK for PHP 2.0 offers flexible parameter configuration and advanced features such as paginators, transfer managers, and File-like operations.
-
Refer to OSS SDK for PHP 2.0 to learn about how to get started.
Source code
Source code is available on GitHub.
Sample code
The following table lists the sample code files in OSS SDK for PHP 1.0.
|
Sample code file |
Content |
|
Upload, download, and manage objects. For more information, see Upload objects, Download objects, and Manage objects. |
|
|
LiveChannel operations. |
|
|
Bucket operations, including Create buckets using OSS SDK for PHP 1.0, List buckets (PHP SDK V1), and Delete a bucket (PHP SDK V1). |
|
|
Configure, query, and delete bucket lifecycle rules. Manage lifecycle rules. |
|
|
Configure, query, and delete logging configurations. For more information, see Log shipping. |
|
|
Configure, query, and delete bucket hotlink protection rules. For more information, see Hotlink protection (PHP SDK V1). |
|
|
Configure, query, and delete bucket static website hosting. For more information, see Static website hosting (PHP SDK V1). |
|
|
Configure, query, and delete CORS rules. For more information, see Manage CORS rules with the PHP SDK V1. |