[Reposted elsewhere] PHP server variable $ _SERVER Xiangjie

2010-04-01  来源:本站原创  分类:PHP  人气:292 

1, $ _SESSION ['PHP_SELF'] - for currently executing script file name

2, $ _SERVER ['SERVER_PROTOCOL'] - request a page name and version of the protocol. For example, "HTTP/1.0".

3, $ _SERVER ['REQUEST_TIME'] - request start timestamp. Starting from PHP 5.1.0 and effective. And time functions the same effect.

4, $ _SERVER ['argv'] - the parameters passed to the script. I tried the next, get method can be $ _SERVER ['argv'] [0]; post method does not give him an assignment.

5, $ _SERVER ['SERVER_NAME'] - returns the current host name.

6, $ _SERVER ['SERVER_SOFTWARE'] - the server identification string, in response to request header information is given. If Microsoft-IIS/6.0

7, $ _SERVER ['REQUEST_METHOD'] - request way to access the page. For example: "GET", "HEAD", "POST", "PUT".

8, $ _SERVER ['QUERY_STRING'] - Query (query) string (URL of the first question mark? After the content).

9, $ _SERVER ['DOCUMENT_ROOT'] - where the currently running script document root directory. Defined in the server configuration file. Such as E: \ server

10, $ _SERVER ['HTTP_ACCEPT'] - the current request of the Accept: header content.

11, $ _SERVER ['HTTP_ACCEPT_CHARSET'] - the current request the Accept-Charset: header from the content. For example: "iso-8859-1, *, utf-8".

12, $ _SERVER ['HTTP_ACCEPT_ENCODING'] - the current request the Accept-Encoding: header content. For example: "gzip".

13, $ _SERVER ['HTTP_ACCEPT_LANGUAGE'] - the current request the Accept-Language: header content. For example: "en".

14, $ _SERVER ['HTTP_CONNECTION'] - the current request the Connection: header from the content. For example: "Keep-Alive".

15, $ _SERVER ['HTTP_HOST'] - the current request of the Host: header content.

16, $ _SERVER ['HTTP_REFERER'] - link to the current page's URL address of the previous page.

17, $ _SERVER ['HTTP_USER_AGENT'] - returns the user to use the browser information. You can also use get_browser () to get this information.

18, $ _SERVER ['HTTPS'] - if access via https, was set to a non-empty value, otherwise it returns off.

19, $ _SERVER ['REMOTE_ADDR'] - are browsing the user's IP address of the current page.

20, $ _SERVER ['REMOTE_HOST'] - the current page the user is browsing the host name. Reverse domain name resolution based on the user's REMOTE_ADDR. Return 127.0.0.1 as the local test

21, $ _SERVER ['REMOTE_PORT'] - the user to connect to the server port to use when. I tested this machine did not pass, do not know why.

22, $ _SERVER ['SCRIPT_FILENAME'] - the current implementation of the script's absolute pathname. Such as the return to E: \ server \ index.php

23, $ _SERVER ['SERVER_ADMIN'] - the value specified in the Apache server configuration file SERVER_ADMIN parameters. If the script is running in a virtual host, then the value is the value that the virtual host

24, $ _SERVER ['SERVER_PORT'] - the port used by the server. The default is "80." If you use SSL secure connection, then the value of the user to set the HTTP port.

25, $ _SERVER ['SERVER_SIGNATURE'] - contains the server version and virtual host name string.

26, $ _SERVER ['PATH_TRANSLATED'] - where the current script file system (not document root) of the basic path. This is the server path to the virtual to the real image of the result. Apache 2 users can use the AcceptPathInfo On httpd.conf to define PATH_INFO.

27, $ _SERVER ['SCRIPT_NAME'] - contains the path of the current script. This page needs to point to yourself, very useful. __FILE__ Contains the current file's absolute path and file name (for example, contains the file).

28, $ _SERVER ['REQUEST_URI'] - needed to access this page URI. For example, "/ index.html".

29, $ _SERVER ['PHP_AUTH_DIGEST'] - When running as an Apache module, for HTTP Digest authentication process, this variable is set to the client to send the "Authorization" HTTP header content (for further certification operation).

30, $ _SERVER ['PHP_AUTH_USER'] - when PHP is running on Apache or IIS (PHP 5 is ISAPI) module mode, and are using HTTP authentication, this variable is the user name entered by the user.

31, $ _SERVER ['PHP_AUTH_PW'] - when PHP is running on Apache or IIS (PHP 5 is ISAPI) module mode, and are using HTTP authentication, this variable is the password entered by the user.

32, $ _SERVER ['AUTH_TYPE'] - when PHP is running under the Apache module, and are using HTTP authentication, this variable is the type of certification.

相关文章
  • [Reposted elsewhere] PHP server variable $ _SERVER Xiangjie 2010-04-01

    1, $ _SESSION ['PHP_SELF'] - for currently executing script file name 2, $ _SERVER ['SERVER_PROTOCOL'] - request a page name and version of the protocol. For example, "HTTP/1.0". 3, $ _SERVER ['REQUEST_TIME'] - request start timestamp. Starting

  • tomcat server.xml configuration Xiangjie 2010-07-12

    Keywords: tomcat server.xml configuration Xiangjie tomcat server.xml configuration Xiangjie Element Name Property Explanation server port Specify a port, the port is responsible for monitoring the request closed tomcat shutdown Specified command stri

  • Detailed PHP server variable $ _SERVER 2010-11-16

    Detailed server variable $ _SERVER: 1, $ _SESSION ['PHP_SELF'] - get current file name of the script being executed 2, $ _SERVER ['SERVER_PROTOCOL'] - request a page name and version of the communication protocol. For example, "HTTP/1.0". 3, $ _

  • Server variables: $ _SERVER 2010-03-03

    "PHP_SELF" Currently executing script file name, and the document root. For example, in the URL address of the script for the http://example.com/test.php/foo.bar use $ _SERVER ['PHP_SELF'] will be / test.php / foo.bar this result. __FILE__ Const

  • Tomcat6 set the virtual directory and the server.xml configuration Xiangjie (change) 2010-03-26

    Tomcat is a popular JSP server, as ASP in IIS to use the same page in the editor's JSp need to deploy a server, Tomcat server is the common choice. The program or download a copy of jsp works elsewhere, can be placed TOmcat Webapps directory home dir

  • tomcat in the server.xml element Xiangjie 2010-07-24

    1 Server 1.1 In the Tomcat world, a Server represents the whole container. Tomcat provides a default implementation of the Server Interface. , and this is rarely Customized by users. 1.2 in tomcat's world, a server on behalf of the entire container.

  • Tomcat in server.xml configuration analysis of a 2010-03-19

    Recently viewed tomcat6 the source code to learn about the inside about process, not yet in-depth on the details, so would like to blog on the tomcat entry through the publication of Server.xml-depth understanding of first-line analysis to understand

  • php $ _SERVER commonly used constants 2010-02-25

    1, $ _SERVER ['PHP_SELF'] - for currently executing script file name 2, $ _SERVER ['SERVER_PROTOCOL'] - request a page name and version of the protocol. For example, "HTTP/1.0". 3, $ _SERVER ['REQUEST_TIME'] - request start timestamp. Starting f

  • PHP in $ _SERVER and description of the detailed parameters 2010-03-25

    PHP programmers often need to use some server some of the information, especially the detailed parameters of the $ _SERVER gathering information to facilitate future use. $_SERVER['PHP_SELF'] # The currently executing script file name, and document r

  • PHP in the detailed usage of $ _SERVER 2010-07-07

    $_SERVER['PHP_SELF'] // Currently executing script file name, and document root Related . $_SERVER['argv'] // The parameters passed to the script . $_SERVER['argc'] // Contains the command line passed to the program the number of parameters ( If runn

  • PHP in $ _SERVER and description of the detailed parameters [change] 2010-07-08

    PHP programmers often need to use some server some of the information, especially the detailed parameters of the $ _SERVER gathering information to facilitate future use. $ _SERVER Code: $ _SERVER ['PHP_SELF'] # currently executing script file name,

  • More use of $ _SERVER 2010-08-06

    $ _SERVER ['PHP_SELF'] # currently executing script file name, and the document root. $ _SERVER ['Argv'] # the parameters passed to the script. $ _SERVER ['Argc'] # contains the command line passed to the program the number of parameters (If you run

  • PHP $ _SERVER detailed in the usage of 2010-11-21

    PHP In $_SERVER Detailed Usage $_SERVER['PHP_SELF'] # Currently executing script file name, and document root Related . $_SERVER['argv'] # The parameters passed to the script . $_SERVER['argc'] # Contains the command line passed to the program the nu

  • $ _SERVER Study compared (to) 2011-01-04

    Note: Transfer from the Internet. Manual carefully to learn a bit today on the content of server variables, write a note, posted hope to help beginners. I think red is more common and important, the blue part is added after I debug, easy to understan

  • PHP get current file path run before, name, server path 2011-01-07

    <? Php var $ a = "test string"; echo 'values obtained through the global variable'. $ GLOBALS ['a']; echo '<br/>'; echo '<br/>'; echo 'The current implementation of the document's file name'. $ _SERVER ['PHP_SELF']; echo '<br/&

  • $ _SERVER Variable is the Chinese translation 2011-04-25

    Detailed server variable $ _SERVER: 1, $ _SESSION ['PHP_SELF'] - get current file name of the script being executed 2, $ _SERVER ['SERVER_PROTOCOL'] - request a page name and version of the communication protocol. For example, "HTTP/1.0". 3, $ _

  • php $_SERVER当前完整url的写法 2015-01-27

    php当前完整url的写法,需要的朋友可以参考下. "http://".$_SERVER ['HTTP_HOST'].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; php server函数 大全 SERVER["HTTP_ACCEPT"]=*/* $_SERVER["HTTP_REFERER"]=http://localhost/lianxi/ $_SERVER[&quo

  • Joomla source code analysis (14) JRequest class does not specify 2010-04-22

    This is another Joomla extension of the most commonly used class, which class encapsulates Kehu side Tijiao the Qingqiuxiangguan the Xin Xi, Tongguo this class you can get users to submit the relevant information and data, several important Han Shu:

  • Tomcat common configuration 2010-06-18

    1. GZIP compression enabled server.xml file: Note: To use gzip compression you could set the following properties: compression = "on" / / open compressionMinSize = "2048" / / enable the GZIP file size noCompressionUserAgents = "go

  • ThinkPHP调试模式与日志记录概述 2014-09-11

    这篇文章主要介绍了ThinkPHP调试模式与日志记录的用法,需要的朋友可以参考下 本文所述为ThinkPHP调试模式与日志记录的使用方法,该功能在进行ThinkPHP项目开发的过程中起到非常重要的作用,有必要加以理解并掌握.具体方法如下: 1.可以在config.php中进行设置,默认为关闭状态. 开启方法如下: 'APP_DEBUG' => true 打开\ThinkPHP\Common\debug.php文件可以查看debug的默认设置如下: return array( 'LOG_RECOR