Neither JCE nor CKEDITOR has solved the problem of files with Chinese names. Either the upload fails, or the uploaded Chinese names cannot be accessed by the web. In contrast, JCE is more user-friendly. For example, after a file is uploaded, it is selected by default, and users do not need to browse up and down in such a small pop-up window to search for the file they just uploaded. After studying the source code of JCE, I changed the way of saving file names and used pure numbers as file names.
Go to the directory where joomla is installed, find components/com_jce/editor/extensions/browser/file.php, and modify lines 1017 - 1020:
Copy the code The code is as follows:
// strip extension
$name = WFUtility::stripExtension($name);
// make file name 'web safe'
$ name = WFUtility::makeSafe($name, $this->get('websafe_mode', 'utf-8'));
changed to
Copy code The code is as follows:
$name = date('Ymd-His-', time()).rand(999);
My joomla version is 1.5 and JCE version 2.1.3. The modified positions of different versions may be slightly different.
http://www.bkjia.com/PHPjc/327590.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327590.htmlTechArticleNeither JCE nor CKEDITOR has solved the problem of Chinese name files. Either the upload failed or the Chinese name was uploaded. The name cannot be accessed by the web. In contrast, JCE is more user-friendly, such as files...