文章摘要
这篇文章主要描述了对FCK编辑器(Firefield CMS)的测试过程,内容包括:从$_POST获取FCK编辑器值并验证其是否为空,加载并配置FCK编辑器脚本,以及创建FCK编辑器对象并设置相关属性(如BasePath和Value)。测试过程中,通过检查$fck值是否为空来确保脚本正确加载和初始化。
$fck=$_POST [ ” FCKeditor1 ” ] ;
if ( $fck !=”” )
{
echo htmlspecialchars ( $fck ) ;
}
?>
include ( ” fckeditor/fckeditor.php ” ) ; //加载文件
$oFCKeditor=new FCKeditor ( ‘ FCKeditor1 ‘ ) ; //创建一个FCKeditor对象 ID为FCKeditor1
$oFCKeditor -> BasePath=” /fck/fckeditor/ ” ; //设置FCKeditor路径
$oFCKeditor -> Value=” ; //设置默认值
$oFCKeditor -> Create () ; //创建。注意:若用到模板(如smarty)则$fck=$oFCKeditor->CreateHtml();然后把$fck抛给模板
?>
© 版权声明
文章版权归作者所有,未经允许请勿转载。



