Home >Backend Development >PHP Tutorial >如何在前台网页显示出ckeditor编辑生成的内容

如何在前台网页显示出ckeditor编辑生成的内容

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:18:151679browse

刚学习php,使用ckeditor文本编辑器编写内容,提交到数据库的内容中含有html标签,但在前台显示的时候直接显示了带有html标签的内容,请问怎样才能正确显示呢?

回复内容:

刚学习php,使用ckeditor文本编辑器编写内容,提交到数据库的内容中含有html标签,但在前台显示的时候直接显示了带有html标签的内容,请问怎样才能正确显示呢?

<code>{!! $content !!}</code>

可能是保存或者取出字符串的过程经过了htmlspecialchars()函数的转义吧,建议朝这个方向去思考

参考:
http://www.w3school.com.cn/php/func_string_htmlspecialchars.asp

Statement:
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