note 126756 added to reserved.variables.server
| From: | bui dot frederic dot pro at gmail dot com | Date: | Tue, 11 Jan 2022 12:43:05 +0000 |
| Subject: | note 126756 added to reserved.variables.server | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217481@lists.php.net to get a copy of this message | ||
You can also enter this code in your body to see all the informations and datas of the super global
Server :
<pre>
<?php
var_dump($_SERVER);
?>
</pre>
Now you can easily create conditions with server field.
You can make for exemple rooting with request_uri like that :
if($_SERVER['REQUEST_URI'] == "/home"){
include ("home.php");
} else {
include ("error404.php");
}
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.135 (proxied: 2a01:cb00:965:6a00:b828:dcce:493d:10e2)
----
Manual Page -- https://php.net/manual/en/reserved.variables.server.php
Edit -- https://main.php.net/note/edit/126756
Del: integrated -- https://main.php.net/note/delete/126756/integrated
Del: useless -- https://main.php.net/note/delete/126756/useless
Del: bad code -- https://main.php.net/note/delete/126756/bad+code
Del: spam -- https://main.php.net/note/delete/126756/spam
Del: non-english -- https://main.php.net/note/delete/126756/non-english
Del: in docs -- https://main.php.net/note/delete/126756/in+docs
Del: other reasons-- https://main.php.net/note/delete/126756
Reject -- https://main.php.net/note/reject/126756
Search -- https://main.php.net/manage/user-notes.php