我在浏览器中打开PHP文件时收到服务器错误500.
这是我的config.php文件:
<?php
return [
's3' => [
'key' => 'xxx',
'secret' => 'xxxx',
'region' => 'ap-southeast-1',
'bucket' => 'abc.def'
]
];
?>
start.php文件:
<?php
require '../vendor/autoload.php';
use Aws\S3\S3Client;
$config = require('config.php');
$s3 = new S3Client([
'region' => $config['s3Client']['region'],
'version' => 'latest',
'credentials' => [
'key' => $config['s3Client']['key'],
'secret' => $config['s3Client']['secret'],
],
]);
?>
当我尝试实例化Amazon S3客户端时,我收到500错误。我是PHP和AWS的新手。代码有什么问题?
答案 0 :(得分:-1)
请确保您对尝试阅读的指定文件(所有者和群组)拥有正确的权限