doulin9679 2019-02-28 21:48
浏览 259

设置动态路径elfinder

i'm using elfinder and i want to set path with php var (from my db connection)

here the array from my connector

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();

The error message is : Invalid backend configuration. Readable volumes not available.

display_file.php including elfinder.php

Here the server organisation

enter image description here Someone can help me ?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信会员卡等级和折扣规则
    • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目
    • ¥20 mysql架构,按照姓名分表
    • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分