View file fm/php/connector.minimal.php

File size: 830B
<?php

//error_reporting(0);

// define('ELFINDER_IMAGEMAGICK_PS', true);

require './autoload.php';

elFinder::$netDrivers['ftp'] = 'FTP';

function access($attr, $path, $data, $volume, $isDir, $relpath) {
/*
	return $basename = basename($path);
	return $basename[0] === '.'
	&& strlen($relpath) !== 1
	? !($attr == 'read' || $attr == 'write')
	: null;
*/
	return null;
}

$opts = array(
	//'debug' => true,
	'roots' => array(
		// Items volume
		array(
			'driver'        => 'LocalFileSystem',
			'path'          => $_SERVER["DOCUMENT_ROOT"],
			'URL'           => 'https://goload.ru/',
			//'trashHash'     => 'tt1_XA',
			'winHashFix'    => DIRECTORY_SEPARATOR !== '/',
			'acceptedName'  => '/^[^\/\0]+$/',
			'accessControl' => 'access'

		)
	)
);

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