Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我有一个值为“CT.< S >”的字符串,但在我的 HTML 中,回显时它被视为标记。是否有一个函数可以用来回显“CT. \< S\>”(例如),以便不将 HTML 视为标签?
htmlspecialchars两者htmlentities都这样做。
htmlspecialchars
htmlentities