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

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

Jun 13, 2016 pm 01:07 PM
content htmlspecialchars kindeditor quot

请教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)有内容没,最后确认编辑器加载正确了没
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

Detailed explanation of the usage of htmlspecialchars function in PHP Detailed explanation of the usage of htmlspecialchars function in PHP Jun 27, 2023 am 10:54 AM

Detailed explanation of the usage of htmlspecialchars function in PHP In web development, it is often necessary to display some user input content on the web page, such as article content, comment content, etc. However, if you display this content directly on a web page, you may encounter some security issues. For example, some users may embed some malicious scripts in comments, which, after being parsed by the browser, will pose a security threat to the website. To prevent this from happening, we need to filter and

PHP function introduction—htmlspecialchars(): escape special characters in strings PHP function introduction—htmlspecialchars(): escape special characters in strings Jul 26, 2023 am 10:41 AM

PHP function introduction—htmlspecialchars(): Escape special characters in a string. When developing web pages, you often encounter situations where user input is processed. In order to ensure that the data entered by the user is safe and reliable, we need to filter the data entered by the user. Among them, the htmlspecialchars() function is a very commonly used function, which can be used to escape special characters in strings. The htmlspecialchars() function has the following syntax:

How to escape HTML special characters in a string using the htmlspecialchars function in PHP How to escape HTML special characters in a string using the htmlspecialchars function in PHP Jun 26, 2023 pm 12:51 PM

HTML special characters are characters with special meaning in HTML. They are mainly used to control the display effect of text. In PHP, if a string contains HTML special characters, you need to use the htmlspecialchars function to escape them to avoid XSS vulnerabilities or other problems. This article will introduce how to escape HTML special characters in a string using the htmlspecialchars function in PHP. 1. What are HTML special characters in HTML? 1.

CSS content properties explained: content, counter, and quotes CSS content properties explained: content, counter, and quotes Oct 21, 2023 am 10:16 AM

Detailed explanation of CSS content attributes: content, counter and quotesCSS (cascading style sheets) is an integral part of front-end development. It can help us beautify web pages and enhance user experience. In CSS, there are some special properties that can be used to control the display of text content, including content, counter, and quotes. This article explains these properties in detail and provides specific code examples. 1. content attribute content attribute

不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没有关问题 不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没有关问题 Jun 13, 2016 am 10:15 AM

不用数据库来实现用户的简单的下载,代码如下,但是却不能下载,请高手找下原因,文件路劲什么的没问题。

图片消失怎么解决 图片消失怎么解决 Apr 07, 2024 pm 03:02 PM

图片消失如何解决先是图片文件上传$file=$_FILES['userfile'];  if(is_uploaded_file($file['tmp_name'])){$query=mysql_query("INSERT INTO gdb_banner(image_src ) VALUES ('images/{$file['name'

Microsoft AI CEO says using open web content to train AI models isn\'t wrong Microsoft AI CEO says using open web content to train AI models isn\'t wrong Jun 30, 2024 pm 10:59 PM

In an interview with CNBC's Andrew Ross Sorkin, Microsoft AI CEO Mustafa Suleymanexpressed his understanding of web copyright law. Suleyman says that content that is accessible on the open web is "freeware," and anyone can copy it, reproduc

See all articles