You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
631 B

---
layout: default
permalink: /installation/
title: Installation
---
# Installation
Through Composer, obviously:
~~~ bash
composer require league/flysystem
~~~
You can also use Flysystem without using Composer by registering an autoloader function:
~~~ php
spl_autoload_register(function($class) {
$prefix = 'League\\Flysystem\\';
if ( ! substr($class, 0, 17) === $prefix) {
return;
}
$class = substr($class, strlen($prefix));
$location = __DIR__ . 'path/to/flysystem/src/' . str_replace('\\', '/', $class) . '.php';
if (is_file($location)) {
require_once($location);
}
});
~~~