84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
$str = "A 'quote' is bold"; // 输出: A 'quote' is <b>bold</b> echo htmlentities($str);
官网的例子,为什么我使用的时候,页面上还是显示A 'quote' isbold而不是注释里的内容
走同样的路,发现不同的人生
If it’s just this piece of code, there will be no problem running it!
It depends on whether you have other codes that are affected
Right click -> View web page source code
Press F12 > Network > Response to view the parameters of the link response. The default browser will escape the ascii code for you.
There is no problem with the running result because this kind of string ‘<’ is parsed by the browser; if you really want to output it like this
bold"; // 输出: A 'quote' is bold echo htmlentities(htmlentities($str)).'';
https://zhidao.baidu.com/ques...
If it’s just this piece of code, there will be no problem running it!
It depends on whether you have other codes that are affected
Right click -> View web page source code
Press F12 > Network > Response to view the parameters of the link response. The default browser will escape the ascii code for you.
There is no problem with the running result because this kind of string ‘<’ is parsed by the browser; if you really want to output it like this
https://zhidao.baidu.com/ques...