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
There are several methods for defining arrays in php. Next we will introduce several common methods for defining and assigning arrays in php. I hope this article will be helpful to beginners.
First, let's take a look at the array. An array is to put
Next, let's take a look at a PHP Binary-based mobile phone number attribution query that is more efficient than traditional queries. I hope the article will provide a good reference value for high-performance users.
Out of curiosity about the
In PHP, we can directly set the Session configuration in php. ini. Below I will introduce you to some reference instructions for specific session configuration in php. ini.
Session configuration in php. ini
The following describes the necessary
This article will introduce you to a php $ _ GET $ _ POST filter SQL injection program code function. I hope some functions will help you, this function can only filter sensitive SQL commands, such as id = 1, you still need to simply filter.
The eval function is a function in php and is not a system component function. disable_functions in php. ini cannot be disabled because it is not a php_function.
Eval () is highly lethal for php security. It is generally not used to prevent
Today, we found that using webmaster tools or related tools can directly view the php and apache versions used by the server, which is very insecure for the website, if there are problems with these versions, you can solve them directly. Let's take
In php, if we want to use the PHP Mcrypt to encrypt the extension library, we must first install the encrypted extension library and then use it, because it is not installed by default like the gd library.
Mcrypt
When writing code programs, PHP
In php, open_basedir is a rarely used function in php, but the open_basedir function is accidentally used to access your server. How amazing is open_basedir? Let's take a look.
Let's look at a piece of code that does not consider open_basedir
Php generates a random password, which is convenient and fast, and can generate a secure and reliable password randomly. I hope this article will help you.
Example
The Code is as follows:
Copy code
Header ("Content-type: text/
We have worked on a recruitment website before, so we need to make sure that we cannot collect the mobile phone numbers and email addresses of our customers, therefore, we will use php to generate an image directly from the mobile phone number and
If you are an seo worker, you may want to convert all the PHP files into html pages. This will benefit the website ranking and reduce the apache load on the server, next I will introduce a php static page generation instance.
Addform. php file
If you are using php5.4, you can only implement it through ajax, iframe, or some other methods. If you are using php5.4, we can use session. upload_progress can be used in combination with js to quickly implement a file upload progress bar.
Next we
File Name garbled characters are generally caused by Chinese characters, because ckeditor uses uft8 encoding. If we use gbk or gb2312 on the page, garbled characters may occur. The solution is to rename the uploaded file.
Open commands. php In the
We sometimes need to remove the header in the utf8 document. We often need to manually clear it. Below I have sorted out several methods to clear the bom header in the utf8 format file using the php program. I hope it will be helpful to you.
Example
This article introduces how to use relevant api interfaces to obtain a php instance in the City Based on the Client IP address. Let's take a look at it.
Today, I am sharing a PHP app that obtains the location of the app Based on the Client IP
I recently configured a wamp Server, but found that the time is different from the local time, and the time obtained by using time is displayed as date, the following describes the causes and solutions.
If the date time is inconsistent, use
This article will introduce you to the usage of PHP variable names. This is just the name of variable variables. Let's take a look.
Sometimes variable names bring great convenience to programming. That is to say, the variable name can be dynamically
Yesterday I also wrote a technical article on Array merging, where I introduced one-dimensional array merging. Here I will introduce the php two-dimensional array merging method. I hope it will be helpful to you.
Example 1
Merge Arrays Using custom
In php, the difference between cookie and session is that cookie data is stored on the client, and session data is stored on the server. Naturally, there will be some detailed differences in usage, however, it is much safer than the former.
1.
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