File Name garbled characters are generally caused by Chinese characters, because ckeditor uses uft8 encoding. If we use gbk or gb2312 on the page, garbled characters may occur. The solution is to rename the uploaded file. File Name garbled characters are generally caused by Chinese characters, because ckeditor uses uft8 encoding. If we use gbk or gb2312 on the page, garbled characters may occur. The solution is to rename the uploaded file.
Script ec (2); script
Open commands. php In the editor/filemanager/connectors/php Directory and find the FileUpload function.
| The Code is as follows: |
|
|
$ SExtension = substr ($ sFileName, (strrpos ($ sFileName, '.') + 1 ));
$ SExtension = strtolower ($ sExtension );
Add later
$ SFileName = rand (0,100). ".". $ sExtension; |
Here, the rand function can change the rename rules as needed.
Another solution is to use the iconv function to encode and convert the file name. However, there is still a problem of duplicate names. Therefore, it is best to rename the image file name Uploaded By Fckeditor.