PHP Classes

File: apps/fileman/php/connector.minimal.php

Recommend this page to a friend!
  Classes of Mark Richards   CliqonV4   apps/fileman/php/connector.minimal.php   Download  
File: apps/fileman/php/connector.minimal.php
Role: Example script
Content type: text/plain
Description: Example script
Class: CliqonV4
Framework with modules to build Web applications
Author: By
Last change:
Date: 6 years ago
Size: 1,244 bytes
 

Contents

Class file image Download
<?php
error_reporting
(0); // Set E_ALL for debuging

// elFinder autoload
require './autoload.php';
// ===============================================

// Enable FTP connector netmount
elFinder::$netDrivers['ftp'] = 'FTP';
// ===============================================

// Documentation for connector options:
// https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options
$opts = array(
   
// 'debug' => true,
   
'roots' => array(
        array(
           
'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
           
'path' => '../../../views/', // path to files (REQUIRED)
           
'URL' => dirname($_SERVER['PHP_SELF']) . '../../../views/', // URL to files (REQUIRED)
           
'uploadDeny' => array('all'), // All Mimetypes not allowed to upload
           
'uploadAllow' => array('image', 'text/plain'),// Mimetype `image` and `text/plain` allowed to upload
           
'uploadOrder' => array('deny', 'allow'), // allowed Mimetype `image` and `text/plain` only
           
'accessControl' => 'access' // disable and hide dot starting files (OPTIONAL)
       
)
    )
);

// run elFinder
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();