In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "thinkphp how to remove html tags", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "thinkphp how to remove html tags" bar!
In thinkphp, you can use the "strip_tags ()" function to remove html tags, which is used to strip HTML, XML, and PHP tags from strings, or to specify that tags that are allowed to exist can be filtered with the syntax "strip_tags (string,allow)".
This article operating environment: Windows10 system, ThinkPHP5 version, Dell G3 computer.
How to remove html tags from thinkphp
The strip_tags () function strips the tags of HTML, XML, and PHP from the string.
This function always strips the HTML comment. This cannot be changed by the allow parameter. This function is binary secure.
The syntax is as follows:
Strip_tags (string,allow)
The parameters are as follows:
String is required. Specifies the string to check.
Allow is optional. The label allowed by the rule. These tags will not be deleted.
The result returned by this function is the string that was stripped.
Examples are as follows:
After specifying the tags that are allowed to exist, the example is as follows:
Thank you for your reading, the above is the content of "thinkphp how to remove html tags". After the study of this article, I believe you have a deeper understanding of how thinkphp removes html tags, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.