<?php 
 $text = $rs[2];
 include("fckeditor/fckeditor.php") ;   //包含文件
 $ofckeditor = new FCKeditor("fckeditor1");  //创建实例
 $ofckeditor->BasePath = "fckeditor/";   //设置FCK的路径
 $ofckeditor->ToolbarSet = "Default";    //设置编辑器工具栏类型
 $ofckeditor->Height = "600px";       //设置编辑器高度
 $ofCKeditor->Value = $text;//这里可以设置value $ofckeditor->Create();   //创建编辑器
?>
以上是我的代码,为什么编辑框里没有显示$text的内容,
请问应该怎么改?

解决方案 »

  1.   

    是不是include文件有问题啊?
    还有$ofckeditor->BasePath = "fckeditor/";  //设置FCK的路径 
    这句这是我的,能正常显示$sBasePath = $_SERVER['PHP_SELF'];
    $sBasePath = dirname($sBasePath);
    $sBasePath = $sBasePath . "/include/fckeditor/";$oFCKeditor = new FCKeditor('FCKeditor1');
    $oFCKeditor->BasePath = $sBasePath;
    $oFCKeditor->Value = $fm_body;$oFCKeditor->Width  = '100%';
    $oFCKeditor->Height = '700';
    $oFCKeditor->Create();