What is the difference between HTTP_HOST and SERVER_NAME in PHP?

前端 未结 10 2479
青春惊慌失措
青春惊慌失措 2020-11-22 07:07

What is the difference between HTTP_HOST and SERVER_NAME in PHP?

where:

  • HTTP_HOST === $_SERVER[\'HTTP_HOST\'
10条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 07:56

    Depends what I want to find out. SERVER_NAME is the host name of the server, whilst HTTP_HOST is the virtual host that the client connected to.

提交回复
热议问题