我正在尝试学习 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) 这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)