在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}> |