php echoing angle brackets

前端 未结 4 602
有刺的猬
有刺的猬 2020-12-07 04:12

I want to display text on the page, the text should look like this:

... but when I echo this, nothing appears!!

How ca I do thi

4条回答
  •  余生分开走
    2020-12-07 05:09

    You probably want <sometext>.

    If that text is coming from user input, you should definitely use htmlspecialchars() on it, to help prevent XSS.

提交回复
热议问题