Install the SDK for PHP
Updated at:
You can install Intelligent Media Services (IMS) SDK for PHP by using Composer or the SDK source code.
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, the dependency is added to the composer.json file. Example:
{ "require": { "alibabacloud/ice-20201109": "^1.0" } }NoteThe preceding dependency version is for reference only. 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. For more information, 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';
Is this page helpful?