note 126756 deleted from reserved.variables.server by crell
| From: | crell@php.net | Date: | Thu, 31 Mar 2022 19:09:24 +0000 |
| Subject: | note 126756 deleted from reserved.variables.server by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-217891@lists.php.net to get a copy of this message | ||
Note Submitter: bui dot frederic dot pro at gmail dot com
----
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");
}