我在php中想输出字符串“¬”却显示成了“¬”,怎样能正常输出呢?
可以通过php内置函数htmlspecialchars来实现¬转义
<p>echo htmlspecialchars("¬");//¬<br/></p>
<div class="aritcle_card">
<a class="aritcle_card_img" href="/ai/1675">
<img src="https://img.php.cn/upload/ai_manual/000/969/633/68b6d5b124798234.png" alt="百度文心百中">
</a>
<div class="aritcle_card_info">
<a href="/ai/1675">百度文心百中</a>
<p>百度大模型语义搜索体验中心</p>
<div class="">
<img src="/static/images/card_xiazai.png" alt="百度文心百中">
<span>22</span>
</div>
</div>
<a href="/ai/1675" class="aritcle_card_btn">
<span>查看详情</span>
<img src="/static/images/cardxiayige-3.png" alt="百度文心百中">
</a>
</div>
<p>echo '¬';//¬</p>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号