我正在运行这段代码:
var_dump($this->string);
$this->string = htmlentities($this->string, ENT_COMPAT, "UTF-8", false);
var_dump($this->string);
它在第一个输出字符串var_dump()
,但在第二个是空的var_dump()
。为什么要这样做?
string(1787) "##Welcome newcomer
We have a `great place` here for you to write whatever you wish, and share it with your friends, family and other random people. Hopefully you enjoy writing for us, we can't wait to see what you have to write about and share with the community!
##Markdown
We don't use your average editor, we use a much simpler one to write fast HTML code. It is called **Markdown**. Here we will show some basic and common Markdown syntax.
|||OTABLE|||
|||OTR|||
|||OTH|||Example|||CTH|||
|||OTH|||Syntax|||CTH|||
|||OTH|||Description|||CTH|||
|||CTR|||
|||OTR|||
|||OTD|||**Bold**|||CTD|||
|||OTD||||||AST||||||AST|||Bold|||AST||||||AST|||
|||UND||||||UND|||Bold|||UND||||||UND||||||CTD|||
|||OTD|||Makes text thicker.|||CTD|||
|||CTR|||
|||OTR|||
|||OTD|||_Italic_|||CTD|||
|||OTD||||||AST|||Italic|||AST|||
|||UND|||Italic|||UND||||||CTD|||
|||OTD|||Makes text slanted|||CTD|||
|||CTR|||
|||OTR|||
|||OTD|||[Google](http://google.com)|||CTD|||
|||OTD||||||LBR|||Google|||RBR||||||LPR|||http://google.com) |||CTD|||
|||OTD|||Makes a text link to a webpage|||CTD|||
|||CTR|||
|||OTR|||
|||OTD|||
|||OBLQU|||I am
part of
a quote
|||CBLQU||||||CTD|||
|||OTD|||
|||GTR|||I am
|||GTR|||part of
|||GTR|||a quote
|||CTD|||
|||OTD|||Creates a quote area|||CTD|||
|||CTR|||
|||OTR|||
|||OTD|||
<html>
<head>
<title>I Am The Title</title>
</head>
</html>
|||CTD|||
|||OTD|||
<html>|||BR|||
<head>|||BR|||
<title>I Am The Title</title>|||BR|||
</head>|||BR|||
</html>
|||CTD|||
|||OTD|||Creates a block of code|||CTD|||
|||CTR|||
|||OTR|||
|||OTD|||I am `inline code`|||CTD|||
|||OTD|||I am |||TIK|||inline code|||TIK||||||CTD|||
|||OTD|||Creates an inline code block|||CTD|||
|||CTR|||
|||CTABLE|||"
string(0) ""