Created
January 14, 2016 16:57
-
-
Save briward/6bd6389e16212605d7d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use League\Flysystem\Filesystem; | |
use League\Flysystem\Adapter\Local; | |
$app = new Slim\App(); | |
// Routes | |
$app->get('/', function($request, $response, $args) { | |
$adapter = new Local(__DIR__); | |
$filesystem = new Filesystem($adapter); | |
$myFileContents = $filesystem->read('myFile.txt'); | |
return $myFileContents; | |
}); | |
$app->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment