In PHP, Global and $globals[] are the more common variables, let's look at a simple example to differentiate the use of global and $globals[].
According to the official explanation is:
1. $GLOBALS [' var '] is the external global variable itself.
A super-simple beginner with PHP tutorial form submission Examples have a friend in need reference. Below we will create a complex form with the code shown below.
The code is as follows
Copy Code
Below we use a few examples to summarize the use of PHP fopen function to achieve file read and write operations, there is a need to learn friends can refer to.
Simple reference fopen function
The fopen () function opens the file or URL.
If open
$_files: Variable submitted to script via HTTP POST file upload, similar to old array $HTTP _post_files array (still valid but opposed to use) details can be found in POST method upload
The contents of the $_files array are as follows:
$_files['
This article describes the scope of PHP variables, references, object references, delivery, there is a need for friends to refer to.
Variable RangeThe scope of a variable is the context in which it is defined (that is, its effective scope). Most PHP
In PHP safe_mode mode for Safe mode, open can give the website strong security, but at the same time will also affect some functions, the following we summarized the Safe_mode mode for those specific functions have an impact, there is a need for
This article to introduce the PHP implementation of 301 permanent redirection will not take the WWW domain name to the domain name with WWW, the implementation method is obtained.
When your site domain name changes or Web address changes (changes in
Let's take a look at the PHP manual about the file_get_contents () function to read the entire file into a string and file (), unlike the file_get_contents () that reads the files into a string.
The file_get_contents () function is the preferred
This article summarizes almost all possible PHP anti-SQL injection class code, you can not enter the reference.
Determine xp_cmdshell performance
Discover Web virtual directories
Upload asp,php,jsp Trojan;
Get administrator privileges;
PHP Whole
Our commonly used MD5 algorithm is not reversible theoretically, but there are powerful methods can be MD5 to calculate out, just according to the complexity of the time required to be different, but sometimes we want to encrypt the transmission of
This article is the first self-defined complex MD5 encryption function to encrypt the password, and then by the system's MD5 encryption program to encrypt, let me introduce the implementation method.
Although the MD5 of the ciphertext is limited,
A more perfect PHP anti-SQL injection code, many beginners have been SQL injection experience it, today we share a more complete SQL anti-injection code, the need for students can refer to
The code is as follows
Copy Code
In PHP development, we generally use PHP's own error handling methods to handle some errors, but some of us need to customize some of the error handling mechanism to solve the problem that the system can not solve.
Basic error handling: Using the
There are three types in the PHP array: An array of numeric IDs with numeric ID keys for each ID key in an array array associated with a value multidimensional array containing one or more arrays of array, OK, now look at my notes.
The
We use the PHP tutorial comes with the magic quotes to determine whether it is open, if it is strips tutorial lashes otherwise use the MySQL tutorial _real_escape_string to filter
If the Magic quotes function is enabled
if
In PHP to convert a time-date to a timestamp (converted to milliseconds) we have a lot of methods, the simplest is to take advantage of the moment () directly to get the millisecond if it is like 2012-05-31, there are other methods to use.
The
Let's look at some of the usage and basic details of the date () function in PHP, as you can see here.
Date function usage
The code is as follows
Copy Code
Date ($t);
The format is as follows:
Format displayed:
The static keyword is to describe the member property and the member method is static in the class, the application of the final keyword can only be used to define the class and the definition method, and cannot use the final keyword to define the
PHP get post post mode pass data Post get PHP post get post difference PHP parameter pass HTTP GET post post and get difference get vs post difference post and get
/**
* @name Date Safe class 0.1
* @author Kevin Xu
* @copyright Kenvin e-mail:gincn@
An array is a set of elements that have some common characteristics, including similarity and type.
Each element is distinguished by a special identifier, called key, and each key has a value
1. Two ways to create an array:
1.1 using the array ()
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