This topic provides the sample code of Object Storage Service (OSS) SDK for PHP in various use cases.
Source code
For the source code of OSS SDK for PHP, visit GitHub.
Sample code
OSS SDK for PHP provides a variety of sample code for your reference or use. The following table lists the sample code files provided by OSS SDK for PHP.
Sample code file | Content |
Operations related to objects, including uploading, downloading, and managing objects. For more information, see Upload objects, Download objects, and Manage objects. | |
Operations related to LiveChannel. | |
Operations related to buckets, including Create buckets, List buckets, and Delete buckets. | |
Operations related to lifecycle management, such as configuring, querying, and deleting lifecycle rules for buckets. For more information, see Manage lifecycle rules. | |
Operations related to logging, such as configuring, querying, and deleting logging configurations. For more information, see Logging. | |
Operations related to hotlink protection on buckets, such as configuring, querying, and deleting hotlink protection configurations for buckets. For more information, see Hotlink protection. | |
Operations related to static website hosting, such as configuring, querying, and deleting static website hosting configurations for buckets. For more information, see Static website hosting. | |
Operations related to cross-origin resource sharing (CORS), such as configuring, querying, and deleting CORS configurations. For more information, see CORS. |