Convert some of the predefined characters to HTML entities and precede predefined characters with backslashes, including single quotes, double quotes, backslashes, and NULL to secure the database
Convert some of the predefined characters to HTML
And the data is HTML.
Code String, such:
Li Si
Article A long string of articles
When intercepting a DIV, you must intercept the content inside the DIV tag and keep the HTML Tag, only to process the text. For example, I may just intercept
I. single quotation marks and double quotation marks are used in PHP's data storage process. That is, when storing data in the database, you must note that single and double quotation marks are escaped;
Let's talk about several PHP functions:
1.
This article summarizes some of the methods used to generate html static files in php and collected on the internet. it is very useful and analyzes their advantages and disadvantages. it is a very good article, we recommend it to you here. I often
Php filters html tag attribute class usage instances. The php method for filtering html tag attribute class Usage examples is as follows: the HtmlAttributeFilter. class. php class file is as follows: 1234567891011121314151617181920212223242526 php
The html string filtering function in php. The custom function code is as follows: functionStripHTML ($ string) {$ patternarray (script [^] *?. *? Scriptsi, style [^] *?. *? Stylesi, [!] *? [^] *? Si, ([rn]) [s] +, (quot | #34); I. A UDF.
This article mainly introduces how to implement html tag closure detection and repair in php. it can detect and complete html tag termination, which is of great practical value, for more information about how to implement html tag closure detection
And the data is the HTML code string, such as this:
Zhang San commented on a long list of articles shared by John Doe
Interception is to intercept the DIV tag inside the thing, and to keep the HTML tag, just to do the text in the processing. For
Php prints html tags. I post a piece of html code on the front end to the background. I want to print it in the background, but why is it like this? Front-end: & lt; div & nbsp; id = "" & nbsp; class = "" & gt; back-end printing: & lt; div & nbsp;
The issue of generating html in php is currently dynamic. How to write and generate html. the template and program are separated by $ SQL & quot; select * fromdede_archives & quot; $ resmysql_query ($ SQL); $ rowmysql_query_fetch ($ res ); $ row
Php prints html tags. I post a piece of html code on the front end to the background. I want to print it in the background, but why is it like this? Front-end: & lt; div & nbsp; & gt; back-end printing: & lt; div & nbsp; & gt; how to remove html
Php Section
Php basic syntax: You can view some websites written by others on the Internet)
1. Create a database connection:
$ Conn = mysql_connect ("localhost", "root", "admin") or die ("cocould not connect ");
Localhost: local host name, root:
This article summarizes some of the methods used to generate html static files in php and collected on the Internet. It is very useful and analyzes their advantages and disadvantages. It is a very good article, we recommend it to you here.
This
// Convert some predefined characters into HTML objects and add a backslash before the predefined characters, including single quotation marks, double quotation marks, backslash, and NULL, to protect database security
// Convert some predefined
And the data given is an HTML code string, like this:
John commented on Dick Share the An article a long list of things
Interception is to intercept the div tag inside of things, and to keep the HTML tags, just to do the processing of the text.
Clickdemo.html: This file contains HTML and AJAX code associated with the link.clicktrack.php:php return operation Information
test
JS CodeThe Web page effects code is a bit more, but here only DoWork (), this function will handle the mouse click,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.