Excerpt from: http://blog.csdn.net/changhong009/article/details/46004343' ----Single quotation mark$ #39; ----single quotes (ie compatible)" -----double QuotesA button in a webpage that writes the handling code of the onclick event is
The difference between single quotation marks and double quotes in PHP
In a programming language, both single and double quotes are important, as is the case in the PHP language. Compared to ASP, PHP quotation marks better use, in ASP, to put the
1. Defining Strings
In PHP, the definition of a string can use either single quotation marks or double quotes. However, you must use the same single or double quotation marks to define strings, such as: ' Hello ' and ' hello ' are illegal
In a programming language, either
single quotation marksStill is
Double quotes, all have a very important role in
PHPLanguage is the same. Compared to ASP, PHP quotation marks better use, the following for you to introduce the difference between
One, the quotation mark defines the string
In PHP, typically a string is defined in a pair of quotation marks, such as:
' I am a string in single quotes '
"I am a string in double quotes"
The PHP parser uses pairs of quotes to determine a string.
PHP Prevent injection attack case analysis, PHP injection Example analysis
In this paper, the method of preventing injection attack by PHP is analyzed in detail. Share to everyone for your reference. The specific analysis is as follows:
PHP
Oracle character replacement function translate usage Oracle provides a character replacement function translate. Unlike the replace function, the translate function replaces character rather than string. The syntax is as follows: TRANSLATE (expr,
One, the quotation mark defines the stringIn PHP, typically a string is defined in a pair of quotation marks, such as:' I am a string in single quotes '"I am a string in double quotes" The PHP parser uses pairs of quotes to determine a string.
Today, I read an example in SQL cookbook. I saw two functions replace and translate have doubts. I feel that these two functions have the same role, the examples in the book are not very clear. After Google's reading the official Oracle explanation,
In this paper, the method of preventing injection attack in PHP is analyzed in detail. Share to everyone for your reference. The specific analysis is as follows:
PHP addslashes () function --single apostrophe plus slash escape
PHP String function
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.