PHP在线编辑器fckeditor应用
网上下载:FCKeditor_2.6.5
add_news.php
--------------------
<?php
include_once 'fckeditor/fckeditor.php';
$sBasePath = $_SERVER['PHP_SELF'];
$sBasePath = dirname($sBasePath) . "/fckeditor/"; //fckeditor.php所在的根目录
$ed = new FCKeditor('con') ;
$ed->BasePath = $sBasePath ;
$ed->Config['SkinPath'] = $sBasePath . '/editor/skins/office2003/'; //皮肤路径
?>
<html><body>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<form action="" method="post">
<input type="text" name="title" value="" />
<?php
$ed->Create();
?>
<br><input name="btn" type="submit" value="添加新闻">
</form>
标题:<?php echo $_POST['title'] ?>
内容:<?php htmlspecialchars(stripslashes($_POST['con'])) ?>
</body></html>