php --- fckeditor

元气小坏坏 提交于 2020-03-02 10:01:31

在php中使用fckeditor时:

在./fckeditor/editor/filemanager/connectors/php/config.php中

修该$_SESSION['user_name']中username值和$Config['UserFilesPath'] =$root_path.'Attachments/'.$date.'/';改为$Config['UserFilesPath'] =ROOT_PATH.'Attachments/'.$date.'/';

在页面中调用

include("FCKeditor/fckeditor.php");
$oFCKeditor = new FCKeditor('FCKeditor1') ; // 创建FCKeditor实例 
$oFCKeditor->BasePath = 'fckeditor/'; // 设置FCKeditor目录地址  
$FCKeditor->Width='100%'; //设置显示宽度  
$FCKeditor->Height='300px'; //设置显示高度的高度    
$fck=$oFCKeditor->CreateHtml() ; // 创建编辑器

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!