我已经将最新版本的KCFinder集成到CKEditor中-每当我点击CKEditor工具栏上的'Browse Server'按钮时,它都会打开KCFinder对话框并下载' browser .php'文件,而不是显示目录的内容。
这几乎是由于某种原因,PHP引擎暂时停止工作-我没有修改任何htaccess文件。
我目前正在使用kcfinder目录内的标准config.php -有人知道可能导致这种情况以及如何修复它吗?
//kcfinder/config。
$_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数组的注释。disabled属性必须设置为false,通常建议通过SESSION变量(put $_SESSION['KCFINDER'] = array();
$_SESSION['KCFINDER']['disabled'] = false;
在session_start()之后,而不是直接在配置文件中。