How PHP prevents SQL injection and development security[PHP] Function Inject_check ($sql _str) {$check =eregi (' select|insert|update|delete|\ ' |\/\*|\*|\.\.\/|\.\/|union| Into|load_file|outfile ', $sql _str); To filter if ($check) {echo '
If var is a non-null or non-zero value, empty () returns FALSE. In other words, 0, 0, NULL, FALSE, array (), var $ var; and objects without any attribute will be considered empty. If var is empty, returns TRUE.
What is the difference between empty
1. convert a PHP string to a numeric string in the original format of the numeric value. convert a string to a numeric. the converted numeric is a numeric string starting from the string.
1. PHP string conversion
A numeric value to a string is
In php, the most common HTML tag can be replaced by the strip_tags function, which can be used to filter all html tags. next I will introduce you to this function.
In php, the most common HTML tag can be replaced by the strip_tags function, which
Before php52, if we want to verify whether the IP address is valid, we need to use regular expressions to verify that the IP address is valid. if it is valid, we need to call ping, but php5
Before php5.2, if we want to verify whether the IP address
When using php built-in functions to intercept Chinese characters, you may encounter question marks. Below are some examples of Chinese characters accurately intercept. Php has only two problems with operating strings.
When using php built-in
My understanding of the echo (), print (), print_r () function is that echo can input string variable constants, and print is similar to echo, however, print_r can print arrays, but the first two cannot,
My understanding of the echo (), print (),
The eval () function is a function that everyone wants to disable in php. The eval () function is very dangerous. let's introduce eval () in php () function problems and solutions.
For a long time, it seems that the eval () function cannot be used
This article describes a new function of php5. we will introduce the usage and some problems of PHP magic function _ autoload, the following summarizes some problems and precautions during usage.
This article describes a new function of php5. we
After receiving this page, PHP creates two arrays, MyArray and mytherarray. Note that you do not need to set an array index in HTML! The array is filled in the table in sequence. You can use the array function library to process these arrays.
To
Recently I want to develop a permission function. I hope that the user will generate a php file corresponding to the user after selecting the set permission in the background, so that as long as the user logs on, I will load the corresponding
First, let's take a look at Arrays. arrays put a group of data together in order. PHP arrays are a little different from other language arrays. First, the stored data can be of any type; second,
First, let's take a look at Arrays. arrays put a group
As you know, the most common function of array sorting is sort ($ arr). it is used to sort by the key values of the array in ascending order, in addition, the sorted array key name is no longer the original key name, and is duplicated by the new
We usually use array () to define data in php. if you do not know the length of the array, you can define the length of the unknown data as array, if you want to clear the data, you can directly unset (array [key]) or directly reset the value to
Sina Weibo has an advanced interface & amp; rsquo; statusesupload_url_text & amp; rsquo; (you need to apply for an additional interface in openweibocom) to transmit an image URL address and text content.
Sina Weibo has an advanced interface
PHPMailer is now a commonly used e-mail sending component for php developers. with PHPMailer, we almost don't need to worry about any issues, as long as we simply put the code online and put the mailbox username and password.
PHPMailer is now a
In PHP, when the variable is 0, the variable is "equal to" false "at the same time. how can we distinguish between 0 and false? This is useful in some condition statements. This article will give an example. First, check the code. the function of
This article introduces how PHP implements 301 permanent redirection to direct a domain name without www to a domain name with www, the implementation method is as follows: when your site domain name changes or the webpage address changes (the
The following describes how to handle exceptions in php. For more information about how to handle exceptions, see this tutorial. The following is a reference segment: 1. allow a method to provide a detailed error mark to the client code 2.
The
Php hyper-global variable $ globals: contains a reference to a valid variable within the global range of each current script. the key of this array is the name of the global variable, $ globals array $ _ server exists from php3: the variable is set
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service