This topic describes how to install PHP dependencies before you can use the PHP SDK.
PHP 5.3 or later is used.
Download the SDKs
- Click the following links and download the public PHP SDK packages and the PHP SDK package dedicated to Content Moderation:
- Create the aliyuncs directory in your project and respectively decompress the preceding SDK packages
in the directory. The following directories are generated after the decompression:
aliyuncs/aliyun-php-sdk-core/... aliyuncs/aliyun-php-sdk-green/Green/... aliyuncs/aliyun-oss-php-sdk/...
- Import the PHP SDK into your code. The sample code is as follows:
include_once 'aliyuncs/aliyun-php-sdk-core/Config.php'; use Green\Request\V20180509 as Green;