What is the meaning of $GLOBALS? How to fix it

Source: Internet
Author: User
What is the meaning of $GLOBALS?
Does the $GLOBALS contain the value of $_get?

For example, is $_get[' t '] the same as $GLOBALS [' t ']?


I wrote this in class:


if (Isset ($GLOBALS [' t ']))
echo $GLOBALS [' t '];

Exit ($_get[' t ');

?>

When I open the Test.php?t=fuck,

Just a fuck, no second fuck?

I'm so embarrassed ..... How do you understand that?

------Solution--------------------
Why is it the same?
Since $GLOBALS does not contain the value of $_get, how can it be the same?
You test it yourself:
PHP Code
Test
';p rint_r ($_get);
------Solution--------------------
$GLOBALS is to define a global variable

$_get is getting the value of submitting the form using Get mode
------Solution--------------------
$_get[' a '] = = = $GLOBALS [' _get '] [' a ']
  • Contact Us

    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

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.