大家帮助我看怎么能让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>
大家能帮助我看下,那里错了,为何就不好用,我能用什么好办法去实现吗?我是个初学者,水平不高,谢谢
解决方案 »
- zend studio 9.0 生成wsdl 在哪
- php中使用什么样的在线编辑器,如何使用?
- php新人小问题,附代码
- PHP “->”是什么意思
- 当我导入多个表时,phpMyAdmin-2.10.1总默认显示为“整理 latin1_swedish_ci”
- 20分求解文本显示问题。。。。
- 如何用php脚本 判断客户端浏览器是否已经断开连接?
- 如何过滤掉字符串中的一些敏感字符,如:<script> <textarea> 之类的。
- 请教 :php 调用com报错!!
- 怎样实现一个永远不会出现重复的字串。用做自动生成用户ID用!
- php学习指导,请熟手给我一个好的php学习计划!
- PHP 急!!!!!!谢谢 大哥进
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');
?>