怎麼取得 阿里雲回傳的電話號碼
使用AlibabaCloud\Client\AlibabaCloud;
#使用AlibabaCloud\Client\Exception\ClientException;
使用AlibabaCloud\Client\Exception\ServerException;
## // 下載:https://github.com/aliyun/openapi-sdk-php
// 使用方法:https://github.com /aliyun/openapi-sdk-php
// 使用方法:https://github.com/aliyun/openapi-sdk-php com/aliyun/openapi-sdk-php/blob/master/README. md
AlibabaCloud::accessKeyClient('
', '' )->regionId('cn-hangzhou') / / 根據需要替換regionId->asDefaultClient();
try {$result = AliyunCloud::rpc()->product('Dyplsapi')// ->scheme('https ') // https | http->版本('2017-05-25')->操作('BindAxn')->方法('POST')
->選項(['查詢' => [
#],]) ->request();print_r($result->toArray());} catch (ClientException $e) {echo $e->getErrorMessage () 。 PHP_EOL;} catch (ServerException $e) {echo $e->getErrorMessage() 。 PHP_EOL;}
Array ( [Message] => OK [RequestId] => B0955ACE- D7E7- 49A0-B39D-E706CD0C7802 [Code] => OK [SecretBindDTO] => Array ( [SecretNo] => 9501364081436 [SubsId] => 319916057719665412 ) )
返回是這樣的。我需要提取[SecretNo] => 9501364081436 [SubsId] => 319916057719665412
#剛剛學php麻煩大家了。###