PHP code example of basilicom / flysystem-pdo
1. Go to this page and download the library: Download basilicom/flysystem-pdo 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/ */
basilicom / flysystem-pdo example snippets
use League\Flysystem\Filesystem;
use Basilicom\Flysystem\Pdo\PdoAdapter;
$pdo = new PDO('mysql:host=mysql;dbname=mydb', 'myuser', 'mypass');
$adapter = new \Basilicom\Flysystem\Pdo\PdoAdapter($pdo);
$flysystem = new Filesystem($adapter);
$path = 'my/path/to/file.txt';
$contents = 'Lorem Ipsum';
$flysystem->write($path, $contents);