sam 发表于 2008-12-28 08:17:19

CI 1.7.0安装FCKeditor2.6.x bug修复方法

如果你使用的是CodeIgniter1.7.0,常规方法可能会产生如下警告
1.
Severity: Warning

Message: Missing argument 1 for Fckeditor::__construct(), called in system\libraries\Loader.php on line 931 and defined

Filename: libraries/fckeditor.php

Line Number: 130

2.
Severity: Notice

Message: Undefined variable: instanceName

Filename: libraries/fckeditor.php

Line Number: 132

解决办法:

1) 在控制器中,按照如下方法加载fckeditor,并传给其构造函数一个数组参数:

$this->load->library('fckeditor',array('instanceName' => 'content'));


2) 我使用的是PHP5,在fckeditor.php中,需要作如下修改:
function __construct( $array )
   {
      $this->InstanceName    = $array['instanceName'] ;
      .....
      .....
   }

接下来,就可以使用了
$content = $this->input->post('content');

tiana 发表于 2008-12-28 14:56:55

暂时还在用1.6.3,收藏备忘先,谢谢

sam 发表于 2008-12-30 08:29:42

CI 1.5.x和1.6.x使用原始方法配置fckeditor没有问题,只有1.7.0有bug

nonzero 发表于 2009-3-31 12:07:06

用fck的时候,空格变成乱码 怎么解决呀?

sam 发表于 2009-3-31 13:11:16

用fck的时候,空格变成乱码 怎么解决呀?
nonzero 发表于 2009-3-31 12:07 http://codeigniter.org.cn/forums/images/common/back.gif

哪里有乱码?必要时可以使用htmlentities转义

erebus 发表于 2009-4-1 15:56:34

回帖做记号,谢谢

lxylxy888666 发表于 2009-4-3 13:57:31

还是自己整的好,,,,,

chenjiawu 发表于 2009-4-7 09:40:08

怎样整合FCKeditor呀?
页: [1]
查看完整版本: CI 1.7.0安装FCKeditor2.6.x bug修复方法