1. Go to this page and download the library: Download phpsoftbox/storage 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/ */
phpsoftbox / storage example snippets
use PhpSoftBox\Storage\Storage;
$storage = new Storage([
'default' => 'uploads',
'disks' => [
'uploads' => [
'driver' => 'local',
'rootPath' => __DIR__ . '/storage', // только абсолютный путь
'baseUrl' => 'https://cdn.local',
],
],
]);
$contents = $storage->disk('uploads')->get('reports/hello.txt');