Php elFinder-从用户输入动态加载路径
我已在本地xampp服务器上安装了v2.1文件管理器。 一切似乎都很顺利。下面是我的connector.phpPhp 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(
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');
});
我有以下几个问题
customData:{token:'42',test:'test'},
和elfinder initiate一起使用。
我不知道如何从connector.php检索这些值。
每次用户单击load_emp按钮时,elFinder都会刷新并指向所选目录- hypweb.net/elFinder nightly/demo/2.1/#elf_l2_Lw
- hypweb.net/elFinder nightly/demo/2.1/#elf_l1_V2VsY29tZQ