<?php
 error_reporting(0);
 require './autoload.php';
 elFinder::$netDrivers['ftp'] = 'FTP';
 function access($attr, $path, $data, $volume, $isDir, $relpath) {
 $basename = basename($path);
 return $basename[0] === '.' && strlen($relpath) !== 1 ? !($attr == 'read' || $attr == 'write') : null;
 }
 $opts = array( 'roots' => array( array( 'driver' => 'LocalFileSystem', 'path' => '../files/', 'URL' => dirname($_SERVER['PHP_SELF']) . '/../files/', 'winHashFix' => DIRECTORY_SEPARATOR !== '/', 'uploadDeny' => array('all'), 'uploadAllow' => array('image/x-ms-bmp', 'image/gif', 'image/jpeg', 'image/png', 'image/x-icon', 'text/plain'), 'uploadOrder' => array('deny', 'allow'), 'accessControl' => 'access' ), ) );
 $connector = new elFinderConnector(new elFinder($opts));
 $connector->run();
 