【发布时间】:2012-12-17 00:29:11
【问题描述】:
我需要在 CKeditor 中显示 doc 文件的内容。 我读取了 doc 文件的内容并将其逐行传递到数组中:
$rs = fopen("text.doc", "r");
while ($line = fgets($rs, 1024)) {
$this->data[] = $line . "<BR>";
}
然后我创建一个 CKeditor 的实例:
include_once("ckeditor/ckeditor.php");
$CKeditor = new CKeditor();
$CKeditor->basePath = '/ckeditor/';
foreach ($this->data as $value) {
//what should I write here
}
$CKeditor->editor('editor1');
CKeditor 现在可以工作并出现在我的网页上.. 但没有任何内容? 我应该在 foreach 中将数组内容传递到编辑器中吗? 请帮忙=(
【问题讨论】: