Home>Article>Backend Development> How to use php's sdk development package

How to use php's sdk development package

王林
王林 Original
2019-10-15 17:54:47 4839browse

How to use php's sdk development package

PHP sdk development package

Step 1. Create Alibaba Cloud Account

Step 2. Obtain Alibaba Cloud access key

In order to use AIRec PHP SDK, you must apply for Alibaba Cloud Cloud access key. Log in to the Alibaba Cloud key management page. Select an access key pair to use with the SDK. If not, create a new access key pair and make sure it is enabled.

Step 3. Install the PHP development environment

AIRec PHP SDK supports PHP 5.2.1 and above. You can install the SDK locally and Set up the corresponding PHP development environment.

Step 4. Start using the SDK

Take the instance creation method CreateInstance as an example to introduce the complete process of using the SDK, including IClientProfile and IAcsClient Two classes are included in the aliyun-php-sdk-core directory, and other classes are included in the aliyun-php-sdk-airec directory.

setContent($content); // 6.使用 Client 对应的方法传入 Request,获得 Response。$response = $client->getAcsResponse($request);// 7.查看 Response 结果echo json_encode($response);

Recommended tutorial:PHP video tutorial

The above is the detailed content of How to use php's sdk development package. For more information, please follow other related articles on the PHP Chinese website!

php
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn