+ 1

How we use superglobals in our practical life ?Explain with some examplegive some practical example of server script , server host

15th Aug 2016, 10:55 AM
Rupam Das
Rupam Das - avatar
1 Answer
+ 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.
18th Aug 2016, 11:21 AM
Bekir Uzun
Bekir Uzun - avatar