最近做了个信息发布网站,使用了FCKEditor,在正式环境运行时,有的机器的浏览器中的FCKEditor空间的中文显示乱码;
调整浏览器的编码也不行...不知道是什么原因...
调整浏览器的编码也不行...不知道是什么原因...
解决方案 »
- 一个紧急的JSP问题,在线等
- 如何提取网页中的特定信息
- 如何计算指定日期30天以后的日期
- jsp的config隐藏对象用来干嘛的?
- 在eclipse下,如何把字符类型转换成时间类型,存到oracle9i中,在线等!!!!!!!!!
- 奇怪,weblogic的连接用户数为什么总是那么大
- 借这里的人气问一个问题???java文件编译之后,不想重新启动weblogic,应该怎样配置weblogic???谢谢了,谁给的建议正确,分就给谁?
- 请问如何取得我的JSP文件的绝对路径
- jsp表单内容提取的问题?
- 谁能帮我看看这个问题出在那啊??
- B/S架构企业应用与网站开发的区别?
- web中的半屏翻页问题<急急急>
七个文件以外的所有文件;
删除目录/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 <strong>sample text</strong>' ;
$oFCKeditor->Create() ;//还可设置
$oFCKeditor->Width
$oFCKeditor->Height
$oFCKeditor->ToolbarSet
......................................................................................................................................................
<textarea name="content" style="display:none">这是文章内容测试!</textarea>
<?php
include_once("fckeditor/fckeditor.php");$oFCKeditor=new fckeditor('content');
$oFCKeditor->BasePath='fckeditor/';
$oFCKeditor->value='default text in editor';
$oFCKeditor->Width='800px';
$oFCKeditor->Height='300px';
$oFCKeditor->create();
//$fck=$oFCKeditor->CreateHtml();
?>
......................................................................................................................................................对于Fckeditor上传中文名文件时显示乱码的问题,现公布方法如下:
测试环境:php 5 , utf-8编码1、修正上传中文文件时文件名乱码问题
在文件connectors/php/commands.php中查找:
$sFileName = $oFile['name'] ;
在后面添加一行:
$sFileName = iconv("utf-8","gbk",$sFileName);2、修正文件列表时中文文件名显示乱码问题
在文件connectors/php/util.php中查找:
return ( utf8_encode( htmlspecialchars( $value ) ) ) ;
修改为:
return iconv('','utf-8',htmlspecialchars( $value ));3、修正新建中文文件夹时的文件夹名乱码问题
在文件connectors/php/commands.php中查找:
$sNewFolderName =
在后面添加一行:
$sNewFolderName = iconv("utf-8","gbk",$sNewFolderName);