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'); 暂时还在用1.6.3,收藏备忘先,谢谢 CI 1.5.x和1.6.x使用原始方法配置fckeditor没有问题,只有1.7.0有bug 用fck的时候,空格变成乱码 怎么解决呀? 用fck的时候,空格变成乱码 怎么解决呀?
nonzero 发表于 2009-3-31 12:07 http://codeigniter.org.cn/forums/images/common/back.gif
哪里有乱码?必要时可以使用htmlentities转义 回帖做记号,谢谢 还是自己整的好,,,,, 怎样整合FCKeditor呀?
页:
[1]