Skip to content
This repository was archived by the owner on Sep 29, 2020. It is now read-only.

Multiple Roots

Josh Schmidt edited this page Oct 30, 2012 · 1 revision

If you would like to add more than one root directory like the one shown in demo, just "mount" another set of driver and name it LocalFileSystem on your opts inside connector.php

Example:

<?php

$opts = array(
    'roots' => array(
        array(
            'driver'        => 'LocalFileSystem',           // driver for accessing file system (REQUIRED)
            'path'          => 'path/to/files/first_root',  // path to files (REQUIRED)
            'URL'           => 'http://localhost/files/first_root/',   // URL to files (REQUIRED)
            'alias'         => 'First home', // The name to replace your actual path name. (OPTIONAL)
            'accessControl' => 'access'      // disable and hide dot starting files (OPTIONAL)
        ),
        array(
            'driver'        => 'LocalFileSystem',
            'path'          => 'path/to/files/second_root',
            'URL'           => 'http://localhost/files/second_root/',
            'alias'         => 'Second home'
        )
    )
);

Discussion: https://github.com/Studio-42/elFinder/issues/98#issuecomment-1866035

Clone this wiki locally