谁做过在线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 变量实实 求教一个关于对象数组的问题 无符号64位整数运算的问题; HTTP/1.1 400 Bad Request 用HttpClient类只能支持Http方法,Https方法怎么办呢? php被加载了恶意so扩展,求禁止phize动态扩展功能,以及全静态php!! 请教如何用php编写mysql的数据库备份程序? 【OnlyFor_love散分】给老猫散分 谢谢你带领我们一起体验php 有比like更高效的匹配查询方法吗? 郁闷死我了。在EditPlus里敲错一个变量名字,我从头到尾查了一遍才找出来 在网页里怎么播放midi音乐 如何获得及时信息 有什么办法在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 变量实实