+ 1
How we use superglobals in our practical life ?Explain with some examplegive some practical example of server script , server host
1 Réponse
+ 2
$_SERVER array hold very variety of information. You can collect visitors IP, referred page and many more. In real life, sometimes you have to create a code works on every website. So if you use http://domainname.com/page.php for example in your redirect page, it wont work on other domains. But if you use PHP_SELF or something like this, it will work on every domain.
You can check http://php.net/manual/reserved.variables.server.php for more information.