Strip_tags
Remove HTML and PHP tags.
Syntax:String strip_tags (string Str );
Return Value: String
Correspondence type: Data Processing
This function removes any HTML and PHP tag strings contained in the string. If the HTML and PHP tags of a string are incorrect, for example, if a greater symbol is missing, an error is returned. And this function and
Fgetss () has the same functions.
Htmlspecialchars
Convert special characters to HTML format.
Syntax:String htmlspecialchars (string );
Return Value: String
Correspondence type: Data Processing
This function converts special characters into the string format of HTML (&....;). The most common use case may be the message board for handling customer messages.
- & (And) to & amp;
- "(Double quotation marks) to & quot;
- <(Less than) to & lt;
- > (Greater than) to & gt;
This function only converts the preceding special characters and does not convert all the characters to the ASCII conversion specified in HTML.
This is an example of Y Pipeline provided by aulbach@unter.franken.de (27-Jan-1999? Bytes/n?
@ Registrant
<Form action = '../B' La> isn't there e? M
<H2> restaurant description <H2>} 8 bytes 1/=?
Name of restaurant: @ brief author #?
<Input type = text name = "restname" value = "<? Hml labels? {
Echo htmlspecialchars ($ restname);?> ">
<! -- The variable $ restname is $ restname = "/" the white horse/""; --> phantom F? Why?
<Br> release 0fw 7 release
Enter the description (if HTML is used, you can use it directly): <br> cannot parse into D?
<Textarea name = "descript"> <? 9? & P? Bytes
Echo htmlspecialchars ($ descript); NV limit 5 Condor
?> </Textarea> 1 ta taobaoyun u
<Input type = submit> B? G?
</Form>
Htmlentities
Convert all the elements into HTML strings.
Syntax:String htmlentities (string );
Return Value: String
Correspondence type: Data Processing
This function is a bit like the htmlspecialchars () function, but this function converts all strings into Special Character Set strings in HTML. However, there will be a lot of troubles in reading the original webpage code after conversion, especially when the text in the original webpage code becomes invisible to the cloud, and what you see on the browser is still normal.