我已经将最新版本的KCFinder集成到CKEditor中-每当我单击CKEditor工具栏上的“浏览服务器”按钮时,它都会打开KCFinder对话框并下载“browse.php”文件,而不是显示目录的内容。

几乎出于某种原因,PHP引擎似乎暂时停止工作-我尚未修改任何htaccess文件。

我目前在kcfinder目录中使用标准的config.php-谁知道这是什么原因以及如何解决?

// kcfinder / config.php

$_CONFIG = array(

'disabled' => true,
'denyZipDownload' => false,
'denyUpdateCheck' => false,
'denyExtensionRename' => false,

'theme' => "oxygen",

'uploadURL' => "",
'uploadDir' => "",

'dirPerms' => 0755,
'filePerms' => 0644,

'access' => array(

    'files' => array(
        'upload' => true,
        'delete' => true,
        'copy' => true,
        'move' => true,
        'rename' => true
    ),

    'dirs' => array(
        'create' => true,
        'delete' => true,
        'rename' => true
    )
),

'deniedExts' => "exe com msi bat php phps phtml php3 php4 cgi pl",

'types' => array(

    // CKEditor & FCKEditor types
    'files'   =>  "",
    'flash'   =>  "swf",
    'images'  =>  "*img",

    // TinyMCE types
    'file'    =>  "",
    'media'   =>  "swf flv avi mpg mpeg qt mov wmv asf rm",
    'image'   =>  "*img",
),

'filenameChangeChars' => array(/*
    ' ' => "_",
    ':' => "."
*/),

'dirnameChangeChars' => array(/*
    ' ' => "_",
    ':' => "."
*/),

'mime_magic' => "",

'maxImageWidth' => 0,
'maxImageHeight' => 0,

'thumbWidth' => 100,
'thumbHeight' => 100,

'thumbsDir' => ".thumbs",

'jpegQuality' => 90,

'cookieDomain' => "",
'cookiePath' => "",
'cookiePrefix' => 'KCFINDER_',

// THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION CONFIGURATION
'_check4htaccess' => true,
//'_tinyMCEPath' => "/tiny_mce",

'_sessionVar' => &$_SESSION['KCFINDER'],
//'_sessionLifetime' => 30,
//'_sessionDir' => "/full/directory/path",

//'_sessionDomain' => ".mysite.com",
//'_sessionPath' => "/my/path",

);

?>

最佳答案

我遇到了同样的问题,我发现kcfinder目录中的.htaccess文件恰好关闭了php引擎。我删除了.htaccess文件,然后工作了。我不明白为什么需要这种关闭。安全??
好吧,指向正确的目录仍然有问题,但是现在我看到了一些东西!

这里是关于上面CONFIG数组的一条评论。必须将禁用的属性设置为false,通常建议通过SESSION变量(将$_SESSION['KCFINDER'] = array();输入
session_start()之后的$_SESSION['KCFINDER']['disabled'] = false;,而不是直接在配置文件中。

10-06 13:28