This topic describes how to install Intelligent Media Services (IMS) SDK for PHP.
Prerequisites
PHP 5.3 or later is installed.
Composer 2.0 or later is installed.
Install the SDK for PHP
Install the SDK for PHP by using Composer
Run the
composer require alibabacloud/ice-20201109command on the terminal to load the server SDK.After the command is run, you can view the version of the dependency in the composer.json file. Sample version:
{ "require": { "alibabacloud/ice-20201109": "^1.0" } }NoteThe preceding dependency version is only for reference. For more information about how to obtain the latest dependency version, see server SDKs.
Include the autoload.php file in the code.
require __DIR__ . '/vendor/autoload.php';
Install the SDK for PHP by using the SDK source code
Download and decompress the server SDK package that contains the source code. For more information about how to download the server SDK package, see Server SDK overview.
Run the
composer installcommand on the terminal to install the server SDK.Include the autoload.php file from the root directory in the code.
require_once '/path/to/ice-sdk/autoload.php';