• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. Developer Guide (PHP SDK)
  4. Quick Start
  5. Installing the SDK

Installing the SDK

The following uses OBS PHP SDK of the latest version as an example:

  1. Download the OBS PHP SDK development package by referring to Downloading the SDK.
  2. Decompress the development package to obtain folder examples (sample code), folder Obs (SDK source code), file composer.json (dependency configuration file), file obs-autoloader.php (file used to automatically load the PHP dependent libraries), file README.txt (feature description file of SDK versions), and file vendor.zip (open-source dependent libraries pre-downloaded for the SDK).
  3. Install the dependent libraries using either of the following methods:

    1. On the command-line interface (CLI), go to the directory where the development package is decompressed, run the composer install command to install the dependencies. A folder named vendor will be generated.
    2. Directly decompress vendor.zip to the directory where the development package is decompressed, and ensure the vendor folder and the Obs folder are stored in directories at the same level.

  4. Delete the vendor.zip package.
  5. (Optional) On Eclipse, import the source code to the PHP project. Open Eclipse PHP IDE and choose Import > Projects from Folder or Archive. Set Import source to the directory where the development package is decompressed.
NOTE:
  • After the installation, the directory structure is similar to the following:

    ├── examples

    ├── Obs

    ├── vendor

    ├── composer.json

    ├── obs-autoloader.php

    └── README.txt