Lokang 

PHP and MySQL

server

This code is an example of using the $_SERVER superglobal array in PHP to access information about the server and the current request. The $_SERVER array contains information about the server, the current request, and the current script.

The code uses the echo statement to print the value of the SERVER_NAME key in the $_SERVER array. This key contains the name of the server that is currently running the script.

The $_SERVER array contains a lot of information about the current request and the server, such as the server name, the server software, the request method, the script name, the client's IP address, the browser's user-agent, and more.

It is worth noting that the information in the $_SERVER array may vary depending on the server configuration and the PHP version used, and some keys may not be available on all servers.

 

<!-- print a server name -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<?php
// print the server name
echo $_SERVER['SERVER_NAME'];
?>
</body>
</html>