PHP code example of jorisros / file-storage
1. Go to this page and download the library: Download jorisros/file-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/ */
jorisros / file-storage example snippets
$parameters = [
'baseDirectory' => '/tmp'
];
$transport = new \JorisRos\FileStorage\Transport\LocaleFile($parameters, $logger);
$fileStorage = new FileStorageService($transport);
$fileStorage->setFileContent('test.txt', 'This is a test');
$data = $fileStorage->getFileContent('test.txt');
echo $data; // Will be 'This is a test' printed
composer