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

WBOY
풀어 주다: 2016-06-06 09:37:18
원래의
823명이 탐색했습니다.

mysqlkindeditor





KindEditor PHP






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


<code><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)</form></code>
로그인 후 복사


$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 成功;
?>

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!