PHP code example of kphoen / gaufrette-extras
1. Go to this page and download the library: Download kphoen/gaufrette-extras 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/ */
kphoen / gaufrette-extras example snippets
$resolver = new PrefixResolver('http://www.my-website.com/uploads');
$adapter = new ResolvableAdapter(new LocalAdapter('/tmp'), $resolver);
$filesystem = new ResolvableFilesystem($adapter);
$filesystem->write('myFile.txt', 'Hello I am the new content');
var_dump($filesystem->resolve('myFile.txt')); // 'http://www.my-website.com/uploads/myFile.txt'
bash
php composer.phar install