FCKeditor支持上传中文文件


事实上来说,并不是支持上传中文文件,而是支持自动重命名文件。我们可以让用户上传后的图片自动重命名成时间日期格式这样的,能够不重复的进行移动。
需要是修改文件:fckeditor\editor\filemanager\upload\php\upload.php

  1. while ( true )
  2. {
  3.     // Compose the file path.
  4.     $sFilePath = $sServerDir . $sFileName ;
  5.     ……
  6. }

在“// Compose the file path”这行下面增加一个命名文件的过程,修改后如下:

  1. while ( true )
  2. {
  3.     // Compose the file path.
  4.     $sFileName = time() . '_' . rand(10000, 99999) . '.' . $sExtension; // 自动重命名文件
  5.     $sFilePath = $sServerDir . $sFileName ;
  6.     ……
  7. }

感谢您的关注。您现在可以 留言(0)留下通告地址



Leave a Reply

Note: Any comments are permitted only because the site owner is letting you post, and any comments will be removed for any reason at the absolute discretion of the site owner.

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image