KCFinder - browse.php下载而不是显示页面

时间:2013-03-07 11:47:02

标签: php javascript file-upload upload ckeditor

我已将最新版本的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",

);

>

1 个答案:

答案 0 :(得分:0)

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

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