打开editor/filemanager/connectors/php目录下commands.php,找到fileupload函数,在
复制代码 代码如下:
$sextension = substr( $sfilename, ( strrpos($sfilename, '.') + 1 ) ) ;
$sextension = strtolower( $sextension ) ;
后添加
复制代码 代码如下:
$sfilename = rand(0,100)...$sextension;
此处rand函数可根据需要自行改变重命名规则。
另一种上传图片文件名乱码解决方法为使用iconv函数对文件名进行编码转换,但仍然存在重名问题,所以针对fckeditor上传图片文件名最好还是重命名