установить динамический путь elfinder - PullRequest
0 голосов
/ 01 марта 2019

Я использую elfinder, и я хочу установить путь с помощью php var (из моего соединения с БД)

здесь массив из моего соединителя

include_once('../../include/header.php');
$CustomerUniqueCode=$InfoG->customer_unique_secure_code;

error_reporting(0); // Set E_ALL for debuging

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

function access($attr, $path, $data, $volume) {
return strpos(basename($path), '.') === 0       // if file/folder begins with '.' (dot)
    ? !($attr == 'read' || $attr == 'write')    // set read+write to false, other (locked+hidden) set to true
    :  null;                                    // else elFinder decide it itself
}
$opts = array(
//'debug' => true,
'roots' => array(
    array(
        'driver'        => 'LocalFileSystem',           // driver for accessing file system (REQUIRED)
        'path'          => '../../folder/customer/'.$CustomerUniqueCode.'/files/',                 // path to files (REQUIRED)
        'URL'           => dirname($_SERVER['PHP_SELF']) . '../../folder/customer/'.$CustomerUniqueCode.'/files/', // URL to files (REQUIRED)
        'tmbPath'       => '../files/thumbnails/',
        'tmbURL'        => dirname($_SERVER['PHP_SELF']) . '/../files/thumbnails',
        '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();

Сообщение об ошибке: Неверноконфигурация бэкэнда.Читаемые тома недоступны.

display_file.php, включая elfinder.php

Здесь серверная организация

enter image description here Кто-то может мне помочь?

...