1. Mysql_real_escape_string ()This function is useful for preventing SQL injection attacks in PHP, with special characters, such as single quotes and double quotes, plus a "backslash" to ensure that the user's input is safe before it is queried. But
PHP Learning Series (1) -- string processing functions (4), php Functions
16. The hebrevc () function switches the flow of Hebrew text from right to left to the flow from left to right. It also converts the new line (\ n) to . Only ASCII characters
Summary of string processing functions in PHP
PHP string processing function Summary, these are the system comes with the PHP string processing function. Addcslashes-adds a backslash escape character for some characters inside a
PHP String processing function DaquanAddcslashes-adds a backslash escape character for some characters inside a stringaddslashes-characters inside a string are escaped in the specified mannerbin2hex-converts binary data to hexadecimal notationalias
1 Find the character position function:Strpos ($str, Search,[int]): Find the first position of search in $str starting with int;Stripos ($str, search,[int]): function returns the position of the first occurrence of a string in another string. This
PHP character escape function summary (the escape string in php ). The article contains incorrect or ambiguous words. please point out ~~~ Configurations and functions related to PHP string escaping are as follows: 1.
Addcslashes-adds a backslash escape character for some characters inside a stringaddslashes-characters inside a string are escaped in the specified mannerbin2hex-converts binary data to hexadecimal notationalias function for Chop-rtrim ()chr-returns
Security has always been a very interesting aspect in programming languages. In any mature programming language there is an appropriate way to ensure the security of the program, in modern WEB development, we often need to deal with user input.
: This article describes how to filter characters in php. For more information about PHP tutorials, see. How to filter characters in php
Configurations and functions related to PHP string escaping are as follows:1. magic_quotes_runtime2.
Functions that are helpful for php security
Security has always been a noteworthy aspect in programming languages. In any mature programming language, there is a proper way to ensure program security. In modern WEB development, we often need to
1 Find the character position function:
Strpos ($str, Search,[int]): Find the first position of search in $str starting with int;
Stripos ($str, search,[int]): function returns the position of the first occurrence of a string in another string. This
PHP's ability to handle strings is very powerful, and there are a variety of ways, but sometimes you need to choose the simplest and most desirable solution. This article lists 10 common string processing cases in PHP, and provides the most
Function: Strip_tags ($STR, $allow)
Role: Remove Html/xml and PHP tags.
Parameters: $allow A label that specifies exceptions, allowing these tags to not be deleted.
world!","world!? " >
Note: the FGETSS () function has a similar function.
Php character filtering method. * ** Character filtering ** $ santype1: removes HTML, XML, and PHP tags. * 2: removes HTML, XML, and PHP tags and converts characters to HTML entities, double quotation marks and single quotation marks ** 3 /**
*
PHP String processing function Daquan
I just read a good summary of the text--php string processing function Daquan
Share:
Addcslashes-adds a backslash escape character for some characters inside a stringaddslashes-characters
1. InnerHtml attributes
The InnerHtml attribute does not automatically encode special characters in and out of HTML objects. HTML entities allow special characters (such as
For example, if the InnerHtml attribute is set to " Hello ", the
PHP String functions are part of the PHP core. These functions can be used without installation.
function
Description
Addcslashes ()
Returns a string that adds a backslash before the specified character.
Code | chinese
/*from:http://blog.joycode.com/hopeq/archive/2005/09/26/64146.aspx*/There is a Web project where requestencoding and responseencoding are gb2312, and the profile data taken from the database may be mixed in Chinese and Korean or
16. The HEBREVC () function converts a right-to-left stream of Hebrew text to a left-to-right stream. It also converts the new line (\ n) to . Only ASCII characters between 224 and 251, as well as punctuation marks, are affected.Syntax: Hebrev
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.