ack_81564050 2015-10-11 06:39
浏览 1211

kindeditor+mysql上传编辑好的有文字和图片的文章,结果数据库里什么都没有

<!doctype html>



KindEditor PHP





<br> KindEditor.ready(function(K) {<br> var editor1 = K.create(&#39;textarea[name=&quot;content1&quot;]&#39;, {<br> cssPath : &#39;./editor/plugins/code/prettify.css&#39;,<br> uploadJson : &#39;./editor/php/upload_json.php&#39;,<br> fileManagerJson : &#39;./editor/php/file_manager_json.php&#39;,<br> allowFileManager : true,<br> afterCreate : function() {<br> var self = this;<br> K.ctrl(document, 13, function() {<br> self.sync();<br> K(&#39;form[name=example]&#39;)[0].submit();<br> });<br> K.ctrl(self.edit.doc, 13, function() {<br> self.sync();<br> K(&#39;form[name=example]&#39;)[0].submit();<br> });<br> }<br> });<br> prettyPrint();<br> });<br>

<form name="example" method="post" action="../03/save.php">
    <textarea name="content1" style="width:700px;height:200px;visibility:hidden;"><?php echo htmlspecialchars($htmlData); ?></textarea>
    <br />
    <input type="submit" name="button" value="提交内容" /> (提交快捷键: Ctrl + Enter)


<?php
$htmlData = '';
if (!empty($_POST['content1'])) {
if (get_magic_quotes_gpc()) {
$htmlData = stripslashes($_POST['content1']);
} else {
$htmlData = $_POST['content1'];
}
}
include_once("function.php");
include_once("conn/conn.php");

echo "$htmlData";
mysql_query("insert into tb_talk ('img') values ('".$htmlData."')",$conn);
echo 成功;
?>

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料