ckeditor4.22版本,ckfinder3,CKFinder 3 for PHP版本。
图片上传时提示:400错误,bad request。
通过编辑文件
D:\wamp\www\module\ckfinder\config.php
修改其配置:
bash
ini_set('display_errors', 1);
$config['debug'] = true;
一番折腾后,发现是因为我现在用的ckfinder是3.5.1,与php8.0不兼容。
ckfinder3.7.0 开始增加webp格式,PHP最少用php8.2。
ckfinder3.6.1 开始支持php8.2,且最少用php8.1。
ckfinder 3.5.3 开始支持php8.1,还能用8.0。
ckfinder 3.5.1.2 开始支持php8.0。
但是我的版本是3.5.1。
更新到对应版本,修改两部分内容:
bash
$config['authentication'] = function () {
return true;
};
bash
$config['backends'][] = array(
'name' => 'default',
'adapter' => 'local',
'baseUrl' => '/upload/',
// 'root' => '', // Can be used to explicitly set the CKFinder user files directory.
'chmodFiles' => 0777,
'chmodFolders' => 0755,
'filesystemEncoding' => 'UTF-8',
);