In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces what the php global array is and how to use the relevant knowledge, the content is detailed and easy to understand, the operation is simple and fast, with a certain reference value, I believe you will get something after reading this php global array and how to use the article, let's take a look at it.
There are nine php global arrays: 1, "$GLOBALS", an array of all defined global variables; 2, "$_ SERVER", an array containing header information, path, and script location; 3, "$_ COOKIE", an array of session data; 4, "$_ GET"; 5, "$_ ENV", and so on.
Operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
Php global array
The full name of php global array is "hyperglobal array" or "hyperglobal variable". It is a specially defined array variable in PHP. It is called superglobal array because these arrays can be accessed anywhere and in any scope in the script, such as functions, classes, files, and so on.
Superglobal array variables are built-in variables that are always available in all scopes.
The superglobal array in PHP includes the following nine:
GLOBALS: contains a reference to a variable that is valid within the global scope of each current script. The key name of the array is the name of the global variable.
$_ SERVER: displays or gets information about the server
$_ GET: pass the data to the server through the address bar, which must be passed in the $_ GET mode
$_ POST: data sent through the form must be in POST mode
$_ REQUEST: contains the above two data transfer methods (POST and GET)
$_ COOKIE: handles the session data of the client
$_ SESSION: handles server-side session data
$_ FILES: the array used to upload files
$_ ENV: variables submitted by the execution environment to the script
$_ GET
Principle
Use one: the browser sends information to the server through a hyperlink (default is GET)
/ / pay attention to how the message is transmitted! data
Note: IE5.5 and IE6 have the problem of odd garbled codes in Chinese, how to solve? Urlencode and urldecode.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.