我正在尝试加载 JSON 配置文件以保护我的 AWS 密钥
a.FileSystemCredentials is not a constructor
at constructor.loadFromPath(aws - sdk.min.js: 46)
Run Code Online (Sandbox Code Playgroud)
此错误阻止我使用 AWS.config.loadFromPath('../../s3.config.json');
当我使用不受保护的实际 jsonDataAWS.config.update([json]);位置时,它工作正常json
应用程序.js:
AWS.config.loadFromPath('../../s3.config.json');
var hub = new AWS.S3({ params: {Bucket: 'mybucket'} });
Run Code Online (Sandbox Code Playgroud)
s3.config.json
{ "accessKeyId": "keyid", "secretAccessKey": "secretkey", "region": "us-east-1" }
所以我设法使用 laravel 一次保存多个数据model::insert(array(...));
示例数据
array (
0 =>
array (
'organization' => '1',
'status' => false,
'project' => '1',
'act_date' => '2016-11-23 08:19:06',
),
1 =>
array (
'organization' => '1',
'status' => false,
'project' => '1',
'act_date' => '2016-11-23 08:19:06',
),
)
Run Code Online (Sandbox Code Playgroud)
我想要的是获取数据,或者至少是插入数组的 id。array({ data[0].id=>1 }, { data[1].id=>2 })该数据还必须包含与插入数据的数量相对应的多个id( )。
问题model::insert(array(...));是它true在成功时返回,false否则返回。
model::create(array(...));返回插入行的数据,但不支持多行插入。
我这里有一个 CSS 代码,可以在悬停时将任何文本/图像旋转180%:
.card-container {
height: 150px;
perspective: 600;
position: relative;
width: 150px;
}
.card {
height: 100%;
position: absolute;
transform-style: preserve-3d;
transition: all 1s ease-in-out;
width: 100%;
}
.card:hover {
transform: rotateY(180deg);
}
.card .side {
backface-visibility: hidden;
height: 100%;
position: absolute;
width: 100%;
}
.card .back {
transform: rotateY(180deg);
}
Run Code Online (Sandbox Code Playgroud)
我可以将其更改为每 2 秒旋转一次吗?而不是等待某人悬停?
$a = int 20;
$b = "ABCD";
$c = $b.$a;
Run Code Online (Sandbox Code Playgroud)
1) 的数据类型是什么$c?
2)连接之前是否需要使用strval() ?