大家帮助我看怎么能让smarty与fckeditor相互结合
我的PHP程序如下:
<?php
require_once("smarty_inc.php");
$smarty->display("new.tpl.html");
?>
模板写法如下:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body><form action="www.php" method="POST">
<table align="center" width="60%" border="1">
<tr>
<td>标题:</td>
<td><input type="text" name="title" size="46"/></td>
</tr>
<tr>
<td>内容:</td>
<td>
<?php
include("../fckeditor/fckeditor.php") ; // 用于载入FCKeditor类文件
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '../fckeditor/' ;
$oFCKeditor->ToolbarSet = 'Default' ;
$oFCKeditor->InstanceName = 'title_conter' ;
$oFCKeditor->Width = '98%' ;
$oFCKeditor->Height = '350' ;
$oFCKeditor->Create() ;
?>
</td>
</tr>
<tr>
<td colspan="2"><center><input type="submit" value="提交" name="submit"></center></td>
</tr>
</table>
</form>
</body>
</html>
大家能帮助我看下,那里错了,为何就不好用,我能用什么好办法去实现吗?我是个初学者,水平不高,谢谢
我的PHP程序如下:
<?php
require_once("smarty_inc.php");
$smarty->display("new.tpl.html");
?>
模板写法如下:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body><form action="www.php" method="POST">
<table align="center" width="60%" border="1">
<tr>
<td>标题:</td>
<td><input type="text" name="title" size="46"/></td>
</tr>
<tr>
<td>内容:</td>
<td>
<?php
include("../fckeditor/fckeditor.php") ; // 用于载入FCKeditor类文件
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '../fckeditor/' ;
$oFCKeditor->ToolbarSet = 'Default' ;
$oFCKeditor->InstanceName = 'title_conter' ;
$oFCKeditor->Width = '98%' ;
$oFCKeditor->Height = '350' ;
$oFCKeditor->Create() ;
?>
</td>
</tr>
<tr>
<td colspan="2"><center><input type="submit" value="提交" name="submit"></center></td>
</tr>
</table>
</form>
</body>
</html>
大家能帮助我看下,那里错了,为何就不好用,我能用什么好办法去实现吗?我是个初学者,水平不高,谢谢
define('SITE_ROOT', $_SERVER['DOCUMENT_ROOT'].'/charlie/');
require_once SITE_ROOT.'smarty/libs/Smarty.class.php';
require_once SITE_ROOT.'db.php';
require_once SITE_ROOT.'config.php';
require_once SITE_ROOT.'global.func.php';
// 省略若干读取数据的代码
$smarty = new Smarty;
$smarty->template_dir = 'smarty/templates/templates';
$smarty->compile_dir = 'smarty/templates/templates_c';
$smarty->config_dir = 'smarty/templates/configs';
$smarty->cache_dir = 'smarty/templates/cache';
$smarty->cache = false;
$smarty->assign('page_title', $field_page_title[$language]);
$smarty->assign('category', $category);
$smarty->display('contactus.tpl');
?>