谁做过在线html编辑器和数据库结合的,给个例子看看拉!谢谢啦!有的话给我一分,thx! 我来接分 看这个http://www.syszedu.net/jiang/dragon/1752.htm 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 /* php 部分<?phpif($submit){if (!empty($f_introduction)) { $f_introduction=str_replace("\n","<br>",$f_introduction); $f_introduction=str_replace("|","│",$f_introduction); $f_introduction=str_replace("\t","",$f_introduction); $f_introduction=str_replace("\r","",$f_introduction);$sql="insert into site_con (con) values ('$f_introduction')";$res=mysql_query($sql);}?>/* javascript 部分<script>function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features);}function openpick() { MM_openBrWindow("pickpic.php",'upload','location=no,status=yes,scrollbars=yes,resizable=yes,width=450,height=300');}function replace(string,text,by) { if (string.length==0 || text.length==0) return string; var i = string.indexOf(text); if (((!i) && (text != string.substring(0,text.length))) || (i== -1)) return string; var newstr = string.substring(0,i) + by; if (i+text.length < string.length) newstr += replace(string.substring(i+ text.length, string.length), text, by); return newstr;}function e2c(text) { text=replace(text,"<BR>","\n"); text=replace(text,"<P>",""); text=replace(text,"</P>","\n"); text=replace(text,"STRONG>","B>"); text=replace(text,"EM>","I>"); text=replace(text,"/UL>\r\n","/UL>"); text=replace(text,"/OL>\r\n","/UL>"); text=replace(text,"#SCRIPT#","<SCRIPT>"); text=replace(text,"#/SCRIPT#","</SC"+"RIPT>"); return text;}function copyedittocontent(){ text=e2c(document.frames['edit'].getHTML()); document.all.f_introduction.value=text;}//--></script>/* html 部分<form name="form1" method="post" action=""><iframe id="edit" src="editor_sm.html" width="100%" height=320 marginwidth=0 marginheight=0 frameborder=0 style="border: 0px #fff solid;"></iframe> /* 调入html编辑器<input type='submit' name='submit' value='发表文章' class='button' onclick="copyedittocontent();"></form> 存数据的时候用$editor 变量实实 高分求个为什么 php输出html内容,单引号和双引号问题请教. 请问高手怎样在discuz的主题列表页调用贴子的内容? 我又来了 分页类(含数据库查询的,不喜欢的请高抬贵手,不要伤我心) 1w条数据跑30毫秒 谁发一个最新的PHP的开发环境给我.Windows2000下的 数据库优化问题:是保持此mysql查询连接的结果,还是关闭此连接而将结果保存入二维数组进行使用好? php能否解压rar文件? 用PHP做转向的问题(更改下载文件名) 网站挂马 求大佬帮看一下怎么在加入一个IF判定语句 如何获得及时信息 有什么办法在gd库的图像里显示中文啊?
<?php
if($submit){
if (!empty($f_introduction)) {
$f_introduction=str_replace("\n","<br>",$f_introduction);
$f_introduction=str_replace("|","│",$f_introduction);
$f_introduction=str_replace("\t","",$f_introduction);
$f_introduction=str_replace("\r","",$f_introduction);$sql="insert into site_con (con) values ('$f_introduction')";
$res=mysql_query($sql);}
?>
/* javascript 部分<script>
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
function openpick() {
MM_openBrWindow("pickpic.php",'upload','location=no,status=yes,scrollbars=yes,resizable=yes,width=450,height=300');
}
function replace(string,text,by) {
if (string.length==0 || text.length==0) return string;
var i = string.indexOf(text);
if (((!i) && (text != string.substring(0,text.length))) || (i== -1)) return string;
var newstr = string.substring(0,i) + by;
if (i+text.length < string.length) newstr += replace(string.substring(i+ text.length, string.length), text, by);
return newstr;
}function e2c(text) { text=replace(text,"<BR>","\n");
text=replace(text,"<P>","");
text=replace(text,"</P>","\n");
text=replace(text,"STRONG>","B>");
text=replace(text,"EM>","I>");
text=replace(text,"/UL>\r\n","/UL>");
text=replace(text,"/OL>\r\n","/UL>");
text=replace(text,"#SCRIPT#","<SCRIPT>");
text=replace(text,"#/SCRIPT#","</SC"+"RIPT>"); return text;
}
function copyedittocontent(){
text=e2c(document.frames['edit'].getHTML());
document.all.f_introduction.value=text;
}
//-->
</script>
/* html 部分<form name="form1" method="post" action=""><iframe id="edit" src="editor_sm.html" width="100%" height=320 marginwidth=0 marginheight=0 frameborder=0 style="border: 0px #fff solid;"></iframe> /* 调入html编辑器<input type='submit' name='submit' value='发表文章' class='button' onclick="copyedittocontent();"></form>
$editor 变量实实