3

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",

);

?>

4

1 に答える 1

0

同じ問題が発生し、kcfinder dir の .htaccess ファイルが正確に php エンジンを停止していることがわかりました。.htaccess ファイルを削除したところ、機能しました。この遮断が必要な理由がわかりません。安全??まあ、正しいディレクトリを指すにはまだ問題がありますが、今は何かが見えます!!

上記の CONFIG 配列に関するコメントが 1 つあります。disabled 属性は false に設定する必要があり、設定ファイルに直接ではなく、SESSION 変数 ( $_SESSION['KCFINDER'] = array(); $_SESSION['KCFINDER']['disabled'] = false;session_start() の後に配置) を介して行うことが推奨されることがよくあります。

于 2013-04-12T10:14:38.627 に答える