The following uses OBS PHP SDK of the latest version as an example:
- Download the OBS PHP SDK development package by referring to Downloading the SDK.
- 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).
- Install the dependent libraries using either of the following methods:
- 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.
- 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.
- Delete the vendor.zip package.
- (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.
- After the installation, the directory structure is similar to the following: