PHP code example of oss-tools / flysystem-ibm-cos
1. Go to this page and download the library: Download oss-tools/flysystem-ibm-cos 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/ */
oss-tools / flysystem-ibm-cos example snippets
use OSSTools\Flysystem\IBMCloudObjectStorage\IbmCosAdapter;
use League\Flysystem\Filesystem;
$storage = new Filesystem(
new IbmCosAdapter([
'key' => '<access_key>',
'secret' => '<access_secret_key>',
'region' => '<region>',
'endpoint' => '<endpoint>',
], '<bucket>')
);
var_dump($storage->listContents(''));