PHP code example of vakata / files
1. Go to this page and download the library: Download vakata/files 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/ */
vakata / files example snippets
php
// create an instance
$files = new \vakata\files\FileStorage('/path/to/dir');
$file = $files->fromFile('/path/to/existing/file'); // stores the file
$files->get($file['id']); // retrieves the file meta data
$file = $files->fromString('save this string', 'into.file.name');
$files->get($file['id']); // retrieves the file meta data