Heim > Fragen und Antworten > Hauptteil
<?php
use AlibabaCloudClientAlibabaCloud;
use AlibabaCloudClientExceptionClientException;
use AlibabaCloudClientExceptionServerException;
// Download:https://github.com/aliyun/openapi-sdk-php
// Verwendung: https://github.com/aliyun/openapi-sdk-php/blob/master/README.md
AlibabaCloud::accessKeyClient('<accessKeyId>', '<accessSecret>')
- >regionId('cn-hangzhou') // RegionId nach Bedarf ersetzen
->asDefaultClient();
try {
$result = AlibabaCloud::rpc()
->product ('Dyplsapi')
// ->scheme('https') // https | http
->version('2017-05-25')
->action('BindAxn')
->method('POST')
->options([
'query ' =>
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 ) Nein] => 9501364081436
[SubsId] => 319916057719665412
刚刚学php 麻烦大家了。