Php elFinder-从用户输入动态加载路径

Php elFinder-从用户输入动态加载路径,php,elfinder,Php,Elfinder,我已在本地xampp服务器上安装了v2.1文件管理器。 一切似乎都很顺利。下面是我的connector.php function access($attr, $path, $data, $volume) { return strpos(basename($path), '.') === 0 ? !($attr == 'read' || $attr == 'write') : null;} $emp_id = 'sm_dir_name'; $opts = array(

我已在本地xampp服务器上安装了v2.1文件管理器。 一切似乎都很顺利。下面是我的connector.php

function access($attr, $path, $data, $volume) {
return strpos(basename($path), '.') === 0
    ? !($attr == 'read' || $attr == 'write')
    :  null;}

$emp_id = 'sm_dir_name';
$opts = array(
    'bind' => array(
    'mkdir mkfile rename duplicate upload rm paste' => array($myLogger, 'log'),
       ),
       'roots' => array(
          array(
             'driver'         => 'LocalFileSystem',
             'path'           => '../../lib/lib_emp/'.$emp_id,
             'URL'            => dirname($_SERVER['PHP_SELF']) . '/../../lib/lib_emp/'.$emp_id, 
             'accessControl'  => 'access',             
             'uploadOverwrite'=> false,
        'debug'               => false,
        'arc'                 => '7za',
        'fileURL'             => true,
etc...;
这是我初始化elFinder的my index.php文件

$(document).ready(function() {
var elf = $('#elfinder').elfinder({
           url             : 'css/connector.php',
           commandsOptions : {
              edit            : {
                        mimes : ['text/plain', 'text/html', 'text/javascript', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'], //types to edit
              editors: [{
                        mimes : ['text/plain', 'text/html', 'text/javascript', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
          load: function(textarea) {
            $(textarea).ckeditor();
          },
          close: function(textarea, instance) {
            CKEDITOR.instances[textarea.id].destroy();
          },
          save: function(textarea, editor) {
            textarea.value = $(textarea).val();
            }

          }
        ]
      }
   }
 }).elfinder('instance');
});
我有以下几个问题

  • 如何在页面加载时禁用elFinder自动加载
  • 如何使用选定的目录名启动elfinder进行加载(客户端应向服务器发送类似于$post方法的值),我想我们可以使用
    customData:{token:'42',test:'test'},
    和elfinder initiate一起使用。 我不知道如何从connector.php检索这些值。 每次用户单击load_emp按钮时,elFinder都会刷新并指向所选目录
  • 一个月以来,我一直在搜索这篇文章以及更多关于埃尔芬德的文章。elFinder开发团队的文档和支持非常差

    我恳请你回答这个问题,以及今后的问题

    致以最良好的祝愿

    苏邦

    如何在页面加载时禁用elFinder自动加载

    客户端配置“rememberLastDir”()

    如何启动elfinder以使用选定的目录名进行加载

    连接器配置“startPath”()

    使用URL哈希

    ex)

    • hypweb.net/elFinder nightly/demo/2.1/#elf_l2_Lw
    • hypweb.net/elFinder nightly/demo/2.1/#elf_l1_V2VsY29tZQ

    非常感谢您的回答。不管怎样,我已经看到了你的存储库,现在我每晚都在使用elFiner。它没有进行任何编辑就解决了这个问题。请告诉我,我在右键单击文件时没有看到任何创建/提取存档。请解释如何启用它。我在windows 7上使用xampp,我对windows server不太了解。但下一个链接可能对您有所帮助。