In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
This article will explain in detail how to encapsulate the vue calendar component. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article. The code of the encapsulated component is shown below
Wechat
About us
Contact us
Product review
car news
thenatureplanet
More Form oMedia:
AutoTimes.
Bestcoffee.
SL News.
Jarebook.
Coffee Hunters.
Sundaily.
Modezone.
NNB.
Coffee.
Game News.
FrontStreet.
GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.