Home > Backend Development > PHP Tutorial > PHP FCKEditor error in uploading Chinese name image_PHP tutorial

PHP FCKEditor error in uploading Chinese name image_PHP tutorial

WBOY
Release: 2016-07-13 10:56:22
Original
951 people have browsed it

FCKEditor is an out-of-town editor and does not support Chinese well. If we directly use Chinese file names, we will get errors or fail to upload images. Let me introduce the solution below.

Share these two modification methods below.

Method 1,

 代码如下 复制代码
打开/editor/filemanager/connectors/php/commands.php,找到$sFileName = $oFile[¹name¹] ;在后面添加一行:$sFileName = iconv("utf-8","gbk",$sFileName);

Method 2 (recommended),

The code is as follows
 代码如下 复制代码

打开/editor/filemanager/connectors/php/commands.php,找到$sExtension = strtolower( $sExtension ) ;在后面添加一行:$sFileName = time().".".$sExtension;

Copy code
Open /editor/filemanager/connectors/php/commands.php and find $sExtension = strtolower( $sExtension ); add a line after it: $sFileName = time().".".$sExtension;

http://www.bkjia.com/PHPjc/632165.htmlwww.bkjia.comtrue
http: //www.bkjia.com/PHPjc/632165.html
TechArticle
FCKEditor editor is a foreign language and does not support Chinese well. If we directly use Chinese file names, an error will occur. , or failed to upload the image, let me introduce the solution below. Share below...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template