上传中文名文件乱码问题
在ckfinder/config.php中找到如下一段配置代码:
| 代码如下 | 复制代码 |
| /* If you have iconv enabled (visit http://ph*p.n*et*/iconv for more information), you can use this directive to specify the encoding of file names in your system. Acceptable values can be found at: http://www.**gn*u.org/software/libiconv/ Examples: $config['FilesystemEncoding'] = 'CP1250'; $config['FilesystemEncoding'] = 'ISO-8859-2'; */ $config['FilesystemEncoding'] = 'UTF-8'; |
|
将UTF-8修改为GB2312,上传后文件名正确了,但在CKEditor中显示的链接出现乱码,因为CKEditor所在页面使用的字符集是UTF-8,未去细究如何解决这个问题,采用了文件重命名的方案去替代解决。
上传文件重命名
修改ckfindercoreconnectorphpphp5CommandHandlerFileUpload.php
找到以下代码
| 代码如下 | 复制代码 |
if ($sFileName != $sUnsafeFileName) {
$iErrorNumber = CKFINDER_CONNECTOR_ERROR_UPLOADED_INVALID_NAME_RENAMED;
}
|
|
| 代码如下 | 复制代码 |
$sExtension=CKFinder_Connector_Utils_FileSystem::getExtension($sFileName);
$sFileName=date('YmdHis').'.'.$sExtension;
|
|
韩剧再婚皇后阿里云盘全集高清1080P资源链接-韩剧再婚皇后免费阿里云盘资源下载4K高清无删减版链接
poipiku网站如何打开-poipiku官网网页版访问入口
明日方舟:终末地-云游戏畅玩入口-明日方舟:终末地-网页版在线直连地址
poki在线小游戏网页版-poki免费游戏大全入口
poki游戏入口-点开即玩-poki游戏-在线免费畅玩
原神akt大佬资源viciNeko入口链接-原神akt大佬资源网页vicineko入口链接分享