简体   繁体   English

在动态表中剥离标签

[英]Strip tags in dynamic table

I'm trying to remove tags from the status feed on my website to stop html/php/javascript injection using the strip_tags() php command. 我正在尝试从我网站上的状态供稿中删除标签,以使用strip_tags()php命令停止html / php / javascript注入。 I'm using a dynamic table and this is my code, except it doesn't work. 我正在使用动态表,这是我的代码,除了它不起作用。 <?php echo strip_tags($row_chat['content'];, '') ?> What's going wrong? <?php echo strip_tags($row_chat['content'];, '') ?>怎么了?

Try This 尝试这个

<?php echo strip_tags($row_chat['content']); ?>

Misplaced ";". 放错了“;”。

Start reading the documentation https://php.net/strip_tags 开始阅读文档https://php.net/strip_tags

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM