PHP predefined variable array 1, $ _ SERVER
The $ _ SERVER super global variable contains information created by the web SERVER. It provides information about the SERVER and the customer configuration and the current request environment. The
Today, let's talk about $_get () and $_post ().
In fact, it is easy to understand, according to the surface meaning can be seen, is to get the post and get form data, in fact, it is so, to point to professional words,
The $_get variable is an array
Hyperglobal variables in PHP start with PHP 4.2.0, and the default value of register_globals is off. as a result, many previous variables that can be directly used are available, for example, $ PHP_SELF or the SESSION variable you set cannot be
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
Let's talk about $ _ GET () and $ _ POST () today (). In fact, it is easy to understand. it can be seen from the surface that it is to obtain the data of the post and get Forms. In fact, this is also the case. to be professional, the $ _ GET
The concept of a hyper-global variable array is different from a global variable, and here I'm mainly talking about using it to receive information. In fact, in the past has been heavily usedFirst: Get array, good speed, but relatively not very safe.
Today, $_get () and $_post ().
In fact, it is easy to understand, according to the superficial meaning can be seen, is to obtain the post and get form data, in fact, it is so, to point professional words,
The $_get variable is an array of variable
The second line of {code...} is for the tutorial. The first line is for my own test. The tutorial does not. The two outputs are the same. Why are 2nd types used in the tutorial? Is it for security reasons or other factors? Thank you.
{$ _ SERVER
Hyperglobal variables in PHP start with PHP 4.2.0, and the default value of register_globals is off. As a result, many variables that can be directly used in the past can be used, for example, $ PHP_SELF or the SESSION variable you set cannot be
There are many hyper-global variables in PHP, which means they are available in all scopes of a script. There is no need to perform a global $variable in a function or method; You can access them.
These hyper-global variables are:
$GLOBALS
Php hyper-global variable $ globals: contains a reference variable that points to the global range of each current script. the key of this array is the name of the global variable, and the $ globals array exists from php3. $ _ serv... php
PHP Hyper-global variables$GLOBALSContains a reference to a globally valid variable that refers to each current script. The Array's key is labeled as the name of the global Variable. $GLOBALS array exists starting with PHP 3.$_serverVariables are
Many of the predefined variables in PHP are "hyper-global", which means they are available in all scopes of a script. The global $variable is not required in a function or method; You can access them.
These hyper-global variables are:
$GLOBALS
Php global variables, which are defined by php global variables. Php global variables, php global variables define PHP global variables PHP pre-defines several Super global variables (superglobals), which means that they can use php global variables
I. PHP data output
PHP supports a wide range of data types. Later, I will use it again and again. I have knowledge about other languages, so I can better understand the uniqueness of PHP. The following describes the PHP output. The basic output
Php array declaration, traversal, array global variables. Php Tutorial array declaration, traversal, array global variable [php]? ** 1. Array Overview * 1. the essence of arrays: managing and operating a group of variables, batch processing * 2.
After understanding the PHP variables, you must understand the use of rules, definitions, output methods, and storage methods before using variables.
After understanding the PHP variables, you must understand the use of rules, definitions, output
After understanding the PHP variables, you must understand the use of rules, definitions, output methods, and storage methods before using variables.
I. PHP Data output
PHP supports a wide range of data types. Later, I will use it again and again.
What this section explains
The implementation of the calculator
Super Global variables
Nested PHP code in HTML
Objective
PHP language is the development of server-side language, is the processing of data, PHP development is
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.