防止Elfinder中的mkdir [英] prevent mkdir in Elfinder
本文介绍了防止Elfinder中的mkdir的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在elfinder中禁用mkdir-option.我只希望允许在(根)文件夹中进行上传. 以下解决方案不会禁用mkdir选项(即使我删除了mkdir).有提示吗?
Im trying to disable the mkdir-option in elfinder. I just want uploads in my (root)-folder allowed. The following solution does not disable the mkdir option (even I removed the mkdir). Any hints?
tinyMCE.activeEditor.windowManager.open({
file : 'elfinder/elfinder.html',
title : 'elFinder 2.0',
width : 950,
height : 630,
resizable : "yes",
uiOptions: {
toolbar : [
// toolbar configuration
['open'],
['back', 'forward'],
['reload'],
['home', 'up'],
['mkfile', 'upload'],
['info'],
['quicklook'],
['copy', 'cut', 'paste'],
['rm'],
['duplicate', 'rename', 'edit'],
['extract', 'archive'],
['search'],
['view'],
['help']
]
},
commands : [
'open', 'reload', 'home', 'up', 'back', 'forward', 'getfile', 'quicklook',
'download', 'rm', 'duplicate', 'rename', 'mkfile', 'upload', 'copy',
'cut', 'paste', 'edit', 'extract', 'archive', 'search', 'info', 'view', 'help'
],
}
推荐答案
编辑connector.php文件并添加一个名为"disabled"的键
Edit the connector.php file and add a key named 'disabled'
'roots' => array(
array(
'driver' => 'LocalFileSystem',
'path' => '../../ava/externo/',
'startPath' => '../../ava/externo/',
'URL' => dirname($_SERVER['PHP_SELF']) . '/../../ava/externo',
'tmbPath' => '.tmb',
'utf8fix' => true,
'tmbCrop' => false,
'tmbBgColor' => 'transparent',
'accessControl' => 'access',
'acceptedName' => '/^[^\.].*$/',
'disabled' => array('extract', 'archive', 'mkdir'),
'tmbSize' => 128,
'attributes' => array(
array(
'pattern' => '/^\/icons$/',
'read' => true,
'write' => false
),
array(
'pattern' => '/\.php$/',
'hidden' => true,
'read' => false
),
array(
'pattern' => '/\.zip$/',
'read' => true,
'write' => true
)
),
'uploadDeny' => array('text/php')
这篇关于防止Elfinder中的mkdir的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文