关于网友提出的“ FCKEditor里中文在有的机器显示乱码”问题疑问,本网通过在网上对“ FCKEditor里中文在有的机器显示乱码”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题: FCKEditor里中文在有的机器显示乱码
描述: 最近做了个信息发布网站,使用了FCKEditor,在正式环境运行时,有的机器的浏览器中的FCKEditor空间的中文显示乱码;
调整浏览器的编码也不行...不知道是什么原因...
解决方案1: 1、首先去官网下载FCKeditor2.6.5 多国语言版。http://ckeditor.com/download,注意:第一个为最新3.0.1版,第二个才是FCKeditor 2.6.5
2、删除不必要的东西:
删除/FCKeditor/目录下除fckconfig.js,fckeditor.js,fckstyles.xml,fcktemplates.xml,fckeditor.php,fckeditor_php5.php,fckeditor_php4.php
七个文件以外的所有文件;
删除目录/editor/_source(基本上,所有_开头的文件夹或文件都是可选的);
删除/editor/filemanager/connectors/下除了php目录的所有目录;
删除/editor/lang/下的除了 en.js, zh.js, zh-cn.js三个文件的所有文件。
3、打开/FCKeditor/fckconfig.js
修改
var FCKConfig.DefaultLanguage = 'zh-cn' ;
var _FileBrowserLanguage = 'php' ;
var _QuickUploadLanguage = 'php' ;
要开启文件上传的话,还需要配置editor\filemanager\connectors\php\config.php
/>
将$Config['Enabled'] = false ;改为$Config['Enabled'] = true ;<>
更改$Config['UserFilesPath'] = '/userfiles/' ;为你的上传目录;
4.调用方法(例子)
将FCKeditor放在网站根目录
在PHP文件里面,包含/FCKeditor/fckeditor.php文件
//包含fckeditor类
include("../FCKeditor/fckeditor.php") ;
//设置编辑器路径
$sBasePath = "/FCKeditor/";
//创建一个Fckeditor,表单的txtarea名称为content
$oFCKeditor = new FCKeditor('content') ;
$oFCKeditor->BasePath = $sBasePath ;
//设置表单初始值
$oFCKeditor->Value = 'This is some sample text' ;
$oFCKeditor->Create() ;
//还可设置
$oFCKeditor->Width
$oFCKeditor->Height
$oFCKeditor->ToolbarSet
......................................................................................................................................................
以上介绍了“ FCKEditor里中文在有的机器显示乱码”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/2148067.html