Home  >  Article  >  Backend Development  >  php中&not怎样禁止转义

php中&not怎样禁止转义

不言
不言Original
2018-05-15 10:05:139929browse

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

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

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



Statement:
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