1. Go to this page and download the library: Download mafordham/aws-s3 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mafordham / aws-s3 example snippets
Or use Composer autoloading by adding the src/ directory to your composer.json:
{
"autoload": {
"psr-4": {
"MaFordham\\AwsS3\\": "src/"
}
}
}
use YourNamespace\\AwsS3\\AwsS3;
$s3 = new AwsS3([
'access_key' => 'YOUR_AWS_ACCESS_KEY',
'secret_key' => 'YOUR_AWS_SECRET_KEY',
'region' => 'us-east-1',
]);