小编Har*_*iya的帖子

AWS SNS 参数电话号码无效

我正在尝试学习 aws sns 服务以从我的 Web 应用程序发送短信。我正在本地主机上工作。

$params = array(
    'credentials' => array(
        'key' => 'iam_key',
        'secret' => 'iam_secret',
    ),
    'region' => 'ap-south-1', // < your aws from SNS Topic region
    'version' => 'latest',
    'http' => ['verify'=>false]
);
$sns = \Aws\Sns\SnsClient::factory($params);

$msgattributes = [
        'AWS.SNS.SMS.SenderID' => [
            'DataType' => 'String',
            'StringValue' => 'Klassroom',
        ],
        'AWS.SNS.SMS.SMSType' => [
            'DataType' => 'String',
            'StringValue' => 'Transactional',
        ]
    ];

$payload = array(
        'Message' => "HK test",
        "PhoneNumber" => "1234567890",
        'MessageAttributes' => $msgattributes
    );

$result = …
Run Code Online (Sandbox Code Playgroud)

php amazon-web-services amazon-sns web

5
推荐指数
1
解决办法
1471
查看次数

保存数组地址的指针地址如何相同?

p是一个整数指针,可以保存int变量的地址,但它也有一个内存地址 - 存储它的位置.

a = 1002 指针的数组地址的基地址p = 2008

当我们写:int *p=a; //p points to the base address of array a
int **r=&p; //means *r points to the address of p

如何*r指向地址a,它应该指向地址p.

#include <stdio.h>
void main()
{
    int a[3] = {1, 2, 3};
    int *p =a;
    int **r = &p;
    printf("%p %p", *r, a);
}
Run Code Online (Sandbox Code Playgroud)

c c++ arrays pointers

1
推荐指数
1
解决办法
159
查看次数

标签 统计

amazon-sns ×1

amazon-web-services ×1

arrays ×1

c ×1

c++ ×1

php ×1

pointers ×1

web ×1