Home >Backend Development >PHP Tutorial >The difference between HTTP_HOST and SERVER_NAME_PHP tutorial

The difference between HTTP_HOST and SERVER_NAME_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:37:14815browse

HTTP_HOST and SERVER_NAME in PHP's SERVER reserved variables are often the same. The reason is that the server port is 80, then HTTP_HOST will be omitted and not displayed, and the default port of the HTTP service is 80, so in most cases, HTTP_HOST This port number is not displayed. And if an ssl link is used, the port number will be displayed.

So HTTP_HOST = SERVER_NAME:SERVER_PORT

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486587.htmlTechArticleHTTP_HOST and SERVER_NAME in PHP's SERVER reserved variables are often the same. The reason is that the server port is 80, then HTTP_HOST will If omitted, it will not be displayed, and the default port of the HTTP service is 80, so...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn