KCFinder'您无权列出文件。'

时间:2012-12-07 09:34:39

标签: permissions kcfinder

我在ckeditor中集成KCFinder有问题。我的ckeditor的版本是4.0而另一个(KCFinder版本)是2.52-dev。

您可以配置ckeditor的config.js:

CKEDITOR.config.baseHref = "/ckeditor/";

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For the complete reference:
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config

    config.contentsCss  = 'contents.css';
    config.language= 'it';
    config.height = '400px';
    config.uiColor = '#ffDC6E';

    //kcfinder per l'uoload delle immagini
    config.filebrowserBrowseUrl = 'kcfinder-2.51/browse.php?type=files';
    config.filebrowserImageBrowseUrl = 'kcfinder-2.51/browse.php?type=images';
    config.filebrowserFlashBrowseUrl = 'kcfinder-2.51/browse.php?type=flash';
    config.filebrowserUploadUrl = '../../../reserved/kcfinder-2.51/upload.php?type=files';
    config.filebrowserImageUploadUrl = '../../../reserved/kcfinder-2.51/upload.php?type=images';
    config.filebrowserFlashUploadUrl = '../../../reserved/kcfinder-2.51/upload.php?type=flash';    

    // Remove some buttons, provided by the standard plugins, which we don't
    // need to have in the Standard(s) toolbar.
    config.removeButtons = 'Subscript,Superscript';
    config.disableNativeSpellChecker = false;
    };

集成是可以的,但当我点击“在服务器中显示文件”或上传图像时,系统会说“你没有列出文件的权限”,但权限是正确的。

有什么问题? TKS 齐射

3 个答案:

答案 0 :(得分:28)

我认为问题是您还需要在KCFinder中配置设置。您需要在KCFinder文件夹中找到config.php,为此:

'disabled' => true

将其更改为false,然后您就可以将文件上传到服务器了。

答案 1 :(得分:6)

不是安全存款的最佳方式,因为在config.php中禁用它允许所有用户访问它,最好的方法是在php文件中加入包含你的textarea的小代码:

$_SESSION['KCFINDER'] = array(
    'disabled' => false
);

希望有所帮助。

答案 2 :(得分:1)

来自kcfinder网站: 默认情况下,KCFinder被禁用。如果您只是将此设置设置为false,则所有公共访问者都可以上传和管理您网站上的文件。建议使用sesssion配置覆盖此设置,以便只有经过身份验证的用户才能使用KCFinder。