AlibabaCloudClientAlibabaCloud 사용;
AlibabaCloudClientExceptionClientException 사용;
AlibabaCloudClientExceptionServerException 사용;
// 다운로드: https://github.com/aliyun/openapi-sdk-php
// 사용법: https://github.com/aliyun/openapi-sdk-php/blob/master/README.md
AlibabaCloud::accessKeyClient('
- >regionId('cn-hangzhou') // 필요에 따라 지역 ID를 교체하세요
->asDefaultClient();
try {
$result = AlibabaCloud::rpc()
->product ('Dyplsapi')
// ->scheme('https') // https | http
->version('2017-05-25')
->action('BindAxn')
->method('POST')
->options([
'query ' => [
],
])
->request();
print_r($result->toArray());
} catch (ClientException $e) {
echo $e->getErrorMessage() . PHP_EOL;
} catch (ServerException $e) {
echo $e->getErrorMessage() . PHP_EOL;
}
Array ( [메시지] => OK [RequestId] => B0955ACE-D7E7-49A0-B39D-E706CD0C7802 [Code] => OK [SecretBindDTO] => 배열( [SecretNo] => 9501364081436 [SubsId] => 319916057719665412 ) )
返回是这样。我需要提取
[SecretNo] = > 9501364081436
[SubsId] => 319916057719665412
刚刚schoolphp 麻烦大家了。
독립적인 디지털 숫자를 추출해야 합니다