1. Go to this page and download the library: Download phant/client 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/ */
use Phant\Client\Service\S3 as ClientS3;
$clientS3 = new ClientS3(
$region,
$endpoint,
$accessKey,
$secretKey,
);
$clientS3->setObject($bucket, 'foo', 'bar');
$bar = $clientS3->getObject($bucket, 'foo');
$clientS3->deleteObject($bucket, 'foo');
use Phant\Client\Service\S3 as ClientS3;
use Phant\Client\Service\S3\Bucket as ClientS3Bucket;
$clientS3Bucket = new ClientS3Bucket(
new ClientS3(
$region,
$endpoint,
$accessKey,
$secretKey,
),
$bucket
);
$clientS3Bucket->set('foo', 'bar');
$bar = $clientS3Bucket->get('foo');
$clientS3Bucket->delete('foo');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.