PHP code example of lombokclarion / storage

1. Go to this page and download the library: Download lombokclarion/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/ */

    

lombokclarion / storage example snippets


LombokClarion\Storage

use LombokClarion\Storage\LocalStorage;

$storage = new LocalStorage('/app/storage/app');

$storage->put('reports/q3.txt', $content);
$content = $storage->get('reports/q3.txt');
$storage->exists('reports/q3.txt'); // true
$storage->delete('reports/q3.txt');

// Uploaded file (random name, validated extension)
$path = $storage->store($uploadedFile, 'avatars', 'jpg');
// → "avatars/a1b2c3d4e5f6.jpg"