All Products
Search
Document Center

Object Storage Service:OSS SDK for PHP 1.0

Last Updated:Jun 03, 2026

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

Object.php

Upload, download, and manage objects. For more information, see Upload objects, Download objects, and Manage objects.

MultipartUpload.php

Multipart upload

Signature.php

Authorized access

Callback.php

Upload callback

Image.php

Image processing

LiveChannel.php

LiveChannel operations.

Bucket.php

Bucket operations, including Create buckets using OSS SDK for PHP 1.0, List buckets (PHP SDK V1), and Delete a bucket (PHP SDK V1).

BucketLifecycle.php

Configure, query, and delete bucket lifecycle rules. Manage lifecycle rules.

BucketLogging.php

Configure, query, and delete logging configurations. For more information, see Log shipping.

BucketReferer.php

Configure, query, and delete bucket hotlink protection rules. For more information, see Hotlink protection (PHP SDK V1).

BucketWebsite.php

Configure, query, and delete bucket static website hosting. For more information, see Static website hosting (PHP SDK V1).

BucketCors.php

Configure, query, and delete CORS rules. For more information, see Manage CORS rules with the PHP SDK V1.

References