<?php
utilisez AlibabaCloudClientAlibabaCloud;
utilisez AlibabaCloudClientExceptionClientException;
utilisez AlibabaCloudClientExceptionServerException;
// Télécharger:https://github.com/aliyun/openapi-sdk-php
// Utilisation: https://github.com/aliyun/openapi-sdk-php/blob/master/README.md
AlibabaCloud::accessKeyClient('<accessKeyId>', '<accessSecret>')
- >regionId('cn-hangzhou') // remplacez regionId selon vos besoins
->asDefaultClient();
essayez {
$result = AlibabaCloud::rpc()
->product ('Dyplsapi')
// ->scheme('https') // https | http
->version('2017-05-25')
->action('BindAxn')
->méthode('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 ( [Message] => OK [RequestId] => B0955ACE-D7E7-49A0-B39D-E706CD0C7802 [Code] => OK [SecretBindDTO] = > Tableau ( [SecretNo] => 9501364081436 [SubsId] => 319916057719665412 )
返回是这样。我需要提取
[SecretNo] => 9501364081436
[SubsId] => 319916057719665412
刚刚学php 麻烦大家了。
Besoin d'extraire des numéros numériques indépendants