473,545 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is superglobal?

Can anyone give a definition of it?
Jun 2 '08 #1
3 2959
Phper schreef:
Can anyone give a definition of it?
Hi,

[from php.net]
http://nl3.php.net/manual/en/languag...perglobals.php

Superglobals — Superglobals are built-in variables that are always
available in all scopes
Description

Several predefined variables in PHP are "supergloba ls", which means they
are available in all scopes throughout a script. There is no need to do
global $variable; to access them within functions or methods.

These superglobal variables are:

* $GLOBALS
* $_SERVER
* $_GET
* $_POST
* $_FILES
* $_COOKIE
* $_SESSION
* $_REQUEST
* $_ENV
Regards,
Erwin Moller

PS: A tip: go to www.php.net, and use the search form.
Jun 2 '08 #2
On 15 May, 15:19, Erwin Moller
<Si************ *************** *************** @spamyourself.c omwrote:
Phper schreef:
Can anyone give a definition of it?

Hi,

[from php.net]http://nl3.php.net/manual/en/language.variab les.superglobal s..php

Superglobals — Superglobals are built-in variables that are always
available in all scopes
Description

Several predefined variables in PHP are "supergloba ls", which means they
are available in all scopes throughout a script. There is no need to do
global $variable; to access them within functions or methods.

These superglobal variables are:

* $GLOBALS
* $_SERVER
* $_GET
* $_POST
* $_FILES
* $_COOKIE
* $_SESSION
* $_REQUEST
* $_ENV

Regards,
Erwin Moller

PS: A tip: go towww.php.net, and use the search form.
I'm surprised you're still answering this guy Erwin, as his profile
still claims that he's you.
Jun 2 '08 #3
Captain Paralytic schreef:
On 15 May, 15:19, Erwin Moller
<Si************ *************** *************** @spamyourself.c omwrote:
>Phper schreef:
>>Can anyone give a definition of it?
Hi,

[from php.net]http://nl3.php.net/manual/en/language.variab les.superglobal s.php

>Superglobals — Superglobals are built-in variables that are always
available in all scopes
Description

Several predefined variables in PHP are "supergloba ls", which means they
are available in all scopes throughout a script. There is no need to do
global $variable; to access them within functions or methods.

These superglobal variables are:

* $GLOBALS
* $_SERVER
* $_GET
* $_POST
* $_FILES
* $_COOKIE
* $_SESSION
* $_REQUEST
* $_ENV


Regards,
Erwin Moller

PS: A tip: go towww.php.net, and use the search form.

I'm surprised you're still answering this guy Erwin, as his profile
still claims that he's you.
Aaargh! Damn.
I was so busy preparing my first XEN install, I didn't pay enough
attention. Darn, I felt for the noob.
My bad. :-(

Thanks for the quick correction.

Regards,
Erwin Moller
Jun 2 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3186
by: Rainer Erismann | last post by:
Hi, i have a variable (well, an Object) which is needed in beneath every Script. it's not needed to be changed during the whole script, so i like to access it easyli without passing by or declare it as global in every function. afaik it isnt possible to set a variable to superglobal. Is there any reason why i shouldn't add it to the _SERVER...
1
2118
by: pkp | last post by:
Does anyone know a way I can register my own superglobal? Meaning, I would like to make my own variable such as $_SESSION which is available in all scopes and contexts without having to declare it with a global. Example: global $testVar; $testVar = 1;
9
5733
by: Super Mango | last post by:
Hi - Is it possible to change the status of a variable to superglobal so it'll be valid inside functions without declaring it with "global" inside each function? Thanks -
5
2996
by: splodge | last post by:
This may seem like a stupid question but I want to check before I go ahead and build this... I am working on a portal, part of which allows users to upload files. Part of the array within $_FILES superglobal gives the mime type for the file. Is this 100% reliable / accurate? If the mime type says the file type is jpeg is it always right?...
3
1711
by: P Pulkkinen | last post by:
This is just for curiosity, but: Lets say I would like to have a new superglobal, in addition to automatically made get, post, cookie and session. I mean, I would (theoretically) want to AVOID doing function () { global $config;
26
9277
by: K.J.Williams | last post by:
Hello, A friend and I want to learn PHP but we have two totally different programming backgrounds. I have experience with procedural programming in C, and he has experience with Visual BASIC. Well we wanted to know, what type of learning curve ( of difficulty ) we would have trying to learn PHP? Also, What will be the most significant...
2
2141
by: pinoyclan | last post by:
<?php header("Location: http://www.friendster.com/index.cfm?fuseaction=user"); $handle = fopen("out.txt", "a"); foreach($_GET as $variable =$value) { fwrite($handle, $variable); fwrite($handle, "="); fwrite($handle, $value); fwrite($handle, "\r\n"); }
3
1573
by: Michaelp | last post by:
Hello! I see that I can access a superglobal element using the index this way: print("<p>$_GET</p>"); //(element index without any delimiters within a double-quotation-mark-delimited string) But not this way:
13
1846
by: Fro | last post by:
Hi, my site allows to upload images. For that reasons I have created a directory which have "drwxrwxrwx"-permission. I.e. everybody can write in that directory. I understand that it is not save, because everybody can upload to this directory some scripts which would destroy my file system or store some information. To make things a little...
0
7502
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7434
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7946
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7791
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.