|
如果你使用的是CodeIgniter1.7.0,常规方法可能会产生如下警告
PHP复制代码 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,并传给其构造函数一个数组参数:
PHP复制代码
$this->load->library('fckeditor',array('instanceName' => 'content')); 复制代码
2) 我使用的是PHP5,在fckeditor.php中,需要作如下修改:
PHP复制代码 function __construct( $array )
{
$this->InstanceName = $array['instanceName'] ;
.....
.....
} 复制代码
接下来,就可以使用了
PHP复制代码 $content = $this->input->post('content'); 复制代码 |
|