最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
smarty模板中怎么使用fckeditor
时间:2022-06-25 02:14:23 编辑:袖梨 来源:一聚教程网
在Smarty中调用FCKeditor的文件
代码如下 | 复制代码 |
//FCKeditor in smarty //[email protected] //2007-09-12 13:14 require_once("conn.php"); require_once("class/Smarty.class.php"); $smarty = new Smarty(); $smarty->template_dir = "../templates"; $smarty->compile_dir = "../templates_c"; $smarty->left_delimiter = "<{"; $smarty->right_delimiter = "}>"; $editor = new FCKeditor("Content") ; $editor->BasePath = "../FCKeditor/"; $editor->ToolbarSet = "Basic"; $editor->Value = ""; $FCKeditor = $editor->CreateHtml(); $smarty->assign('Title',"Rossy is here waiting for you"); $smarty->assign('FCKeditor',$FCKeditor); $smarty->display('template.tpl'); |
但,运用这一种方法在编辑资料的时候竟然FCKeditor传不了值,只是生成了一个空值的编辑器,所以只能换一种方法:
代码如下 | 复制代码 |
//FCKeditor in smarty |
调用
代码如下 | 复制代码 |
Example title:<{$Title}> content: <{$FCKeditor}> |