All Products
Search
Document Center

Installation

Last Updated: Mar 08, 2019

Environment requirements

You have installed PHP 5.3 or a later version. You can run the php -v command to view the current PHP version. If PHP has not been installed, you can visit the PHP official website to download and install an appropriate version.

Install the SDK

  1. Add an empty folder aliyun-php-sdk to your PHP project for managing SDK files centrally.

  2. Download the entire source code from aliyun-openapi-php-sdk. Decompress the downloaded package and copy the aliyun-php-sdk-core and aliyun-php-sdk-vod folders to the aliyun-php-sdk directory.

  3. Open the aliyun-php-sdk/aliyun-php-sdk-core/Config.php file, locate “//config sdk auto load path.”, and add the following code below this line:

  1. Autoloader::addAutoloadPath("aliyun-php-sdk-vod");

Update the SDK

If new APIs or new features of existing APIs are unavailable in the current SDK version, you can update the SDK to the latest version.Then download the entire source code from aliyun-openapi-php-sdk. Decompress the downloaded package and copy the aliyun-php-sdk-core and aliyun-php-sdk-vod folders to the aliyun-php-sdk directory to overwrite the original files. The procedure is as follows:

  1. Open the ChangeLog.txt file in the aliyun-php-sdk-core and aliyun-php-sdk-vod folders to view the downloaded SDK version (in the first line).

  2. View the latest SDK version on the download page , as shown in the following figure.php-core-versionphp-vod-version

Uninstall the SDK

Delete the local SDK directory.