Home > Backend Development > PHP Tutorial > 请问kindeditor添加与显示数据库的有关问题

请问kindeditor添加与显示数据库的有关问题

WBOY
Release: 2016-06-13 10:57:12
Original
885 people have browsed it

请教kindeditor添加与显示数据库的问题
用kindeditor作为文章内容的编辑,可以把kindeditor的内容添加到数据库中,但,修改操作时,kindeditor显示不了数据库的内容。怎么回事?
是不是下面代码要进行修改?

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php $htmlData = '';    if (!empty($_POST['content1'])) {        if (get_magic_quotes_gpc()) {            $htmlData = stripslashes($_POST['content1']);        } else {            $htmlData = $_POST['content1'];        }    }?><textarea name="content1" style="width:700px;height:200px;visibility:hidden;"><?php echo htmlspecialchars($htmlData); ?></textarea>
Copy after login

请高手指点,谢谢!!

------解决方案--------------------
echo $htmlData ; //有不有数据哦
------解决方案--------------------
先确定htmlspecialchars($htmlData)有内容没,最后确认编辑器加载正确了没
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template