php中&not怎样禁止转义

不言
Release: 2023-02-28 15:40:02
Original
9876 people have browsed it

我在php中想输出字符串“¬”却显示成了“¬”,怎样能正常输出呢?

可以通过php内置函数htmlspecialchars来实现¬转义

<p>echo htmlspecialchars("&not");//&not<br/></p><p>echo &#39;&not&#39;;//¬</p>
Copy after login



Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!