: This article mainly introduces the built-in blog variables. For more information about PHP tutorials, see.
Name |
Version |
Description (the variable list is from the ngx_http_variables file) |
$ Args |
1.0.8 |
Parameters in the request; |
$ Binary_remote_addr |
1.0.8 |
Binary representation of remote addresses |
$ Body_bytes_sent |
1.0.8 |
Number of sent message body bytes |
$ Content_length |
1.0.8 |
"Content-Length" in the HTTP request information "; |
$ Content_type |
1.0.8 |
"Content-Type" in the request information "; |
$ Document_root |
1.0.8 |
Set the value for the root path of the current request; |
$ Document_uri |
1.0.8 |
Same as $ uri; |
$ Host |
1.0.8 |
"Host" in the request information. if the request does not contain the Host line, it is equal to the configured server name; |
$ Hostname |
1.0.8 |
|
$ Http_cookie |
1.0.8 |
Cookie information |
$ Http_post |
1.0.8 |
|
$ Http_referer |
1.0.8 |
Reference address |
$ Http_user_agent |
1.0.8 |
Client proxy information |
$ Http_via |
1.0.8 |
The IP address of the last access server. Http://www.cnblogs.com/deng02/archive/2009/02/11/1387911.html |
$ Http_x_forwarded_for |
1.0.8 |
It is equivalent to the network access path. Http://www.cnblogs.com/craig/archive/2008/11/18/1335809.html |
$ Is_args |
1.0.8 |
|
$ Limit_rate |
1.0.8 |
Restrictions on connection speed; |
$ Nginx_version |
1.0.8 |
|
$ Pid |
1.0.8 |
|
$ Query_string |
1.0.8 |
Same as $ args; |
$ Realpath_root |
1.0.8 |
|
$ Remote_addr |
1.0.8 |
Client address; |
$ Remote_port |
1.0.8 |
Client port number; |
$ Remote_user |
1.0.8 |
Client user name, used for authentication; |
$ Request |
1.0.8 |
User request |
$ Request_body |
1.0.8 |
|
$ Request_body_file |
1.0.8 |
Name of the local file sent to the backend |
$ Request_completion |
1.0.8 |
|
$ Request_filename |
1.0.8 |
File path name of the current request |
$ Request_method |
1.0.8 |
Request methods, such as "GET" and "POST; |
$ Request_uri |
1.0.8 |
The requested URI with parameters; |
$ Scheme |
1.0.8 |
The protocol used, such as http or https, such as rewrite ^ (. +) $ scheme: // example.com $1 redirect; |
$ Sent_http_cache_control |
1.0.8 |
|
$ Sent_http_connection |
1.0.8 |
|
$ Sent_http_content_length |
1.0.8 |
|
$ Sent_http_content_type |
1.0.8 |
|
$ Sent_http_keep_alive |
1.0.8 |
|
$ Sent_http_last_modified |
1.0.8 |
|
$ Sent_http_location |
1.0.8 |
|
$ Sent_http_transfer_encoding |
1.0.8 |
|
$ Server_addr |
1.0.8 |
Server address. if you do not use listen to specify the server address, using this variable will initiate a system call to obtain the address (resulting in a waste of resources ); |
$ Server_name |
1.0.8 |
The name of the server to which the request arrives; |
$ Server_port |
1.0.8 |
The port number of the server to which the request arrives; |
$ Server_protocol |
1.0.8 |
Request Protocol version, "HTTP/1.0" or "HTTP/1.1 "; |
$ Uri |
1.0.8 |
The requested URI may be different from the original value, for example, after redirection |
Name |
Version |
Description (the variable list is from the ngx_http_variables file) |
$ Args |
1.0.8 |
Parameters in the request; |
$ Binary_remote_addr |
1.0.8 |
Binary representation of remote addresses |
$ Body_bytes_sent |
1.0.8 |
Number of sent message body bytes |
$ Content_length |
1.0.8 |
"Content-Length" in the HTTP request information "; |
$ Content_type |
1.0.8 |
"Content-Type" in the request information "; |
$ Document_root |
1.0.8 |
Set the value for the root path of the current request; |
$ Document_uri |
1.0.8 |
Same as $ uri; |
$ Host |
1.0.8 |
"Host" in the request information. if the request does not contain the Host line, it is equal to the configured server name; |
$ Hostname |
1.0.8 |
|
$ Http_cookie |
1.0.8 |
Cookie information |
$ Http_post |
1.0.8 |
|
$ Http_referer |
1.0.8 |
Reference address |
$ Http_user_agent |
1.0.8 |
Client proxy information |
$ Http_via |
1.0.8 |
The IP address of the last access server. Http://www.cnblogs.com/deng02/archive/2009/02/11/1387911.html |
$ Http_x_forwarded_for |
1.0.8 |
It is equivalent to the network access path. Http://www.cnblogs.com/craig/archive/2008/11/18/1335809.html |
$ Is_args |
1.0.8 |
|
$ Limit_rate |
1.0.8 |
Restrictions on connection speed; |
$ Nginx_version |
1.0.8 |
|
$ Pid |
1.0.8 |
|
$ Query_string |
1.0.8 |
Same as $ args; |
$ Realpath_root |
1.0.8 |
|
$ Remote_addr |
1.0.8 |
Client address; |
$ Remote_port |
1.0.8 |
Client port number; |
$ Remote_user |
1.0.8 |
Client user name, used for authentication; |
$ Request |
1.0.8 |
User request |
$ Request_body |
1.0.8 |
|
$ Request_body_file |
1.0.8 |
Name of the local file sent to the backend |
$ Request_completion |
1.0.8 |
|
$ Request_filename |
1.0.8 |
File path name of the current request |
$ Request_method |
1.0.8 |
Request methods, such as "GET" and "POST; |
$ Request_uri |
1.0.8 |
The requested URI with parameters; |
$ Scheme |
1.0.8 |
The protocol used, such as http or https, such as rewrite ^ (. +) $ scheme: // example.com $1 redirect; |
$ Sent_http_cache_control |
1.0.8 |
|
$ Sent_http_connection |
1.0.8 |
|
$ Sent_http_content_length |
1.0.8 |
|
$ Sent_http_content_type |
1.0.8 |
|
$ Sent_http_keep_alive |
1.0.8 |
|
$ Sent_http_last_modified |
1.0.8 |
|
$ Sent_http_location |
1.0.8 |
|
$ Sent_http_transfer_encoding |
1.0.8 |
|
$ Server_addr |
1.0.8 |
Server address. if you do not use listen to specify the server address, using this variable will initiate a system call to obtain the address (resulting in a waste of resources ); |
$ Server_name |
1.0.8 |
The name of the server to which the request arrives; |
$ Server_port |
1.0.8 |
The port number of the server to which the request arrives; |
$ Server_protocol |
1.0.8 |
Request Protocol version, "HTTP/1.0" or "HTTP/1.1 "; |
$ Uri |
1.0.8 |
The requested URI may be different from the original value, for example, after redirection |
Name |
Version |
Description (the variable list is from the ngx_http_variables file) |
$ Args |
1.0.8 |
Parameters in the request; |
$ Binary_remote_addr |
1.0.8 |
Binary representation of remote addresses |
$ Body_bytes_sent |
1.0.8 |
Number of sent message body bytes |
$ Content_length |
1.0.8 |
"Content-Length" in the HTTP request information "; |
$ Content_type |
1.0.8 |
"Content-Type" in the request information "; |
$ Document_root |
1.0.8 |
Set the value for the root path of the current request; |
$ Document_uri |
1.0.8 |
Same as $ uri; |
$ Host |
1.0.8 |
"Host" in the request information. if the request does not contain the Host line, it is equal to the configured server name; |
$ Hostname |
1.0.8 |
|
$ Http_cookie |
1.0.8 |
Cookie information |
$ Http_post |
1.0.8 |
|
$ Http_referer |
1.0.8 |
Reference address |
$ Http_user_agent |
1.0.8 |
Client proxy information |
$ Http_via |
1.0.8 |
The IP address of the last access server. Http://www.cnblogs.com/deng02/archive/2009/02/11/1387911.html |
$ Http_x_forwarded_for |
1.0.8 |
It is equivalent to the network access path. Http://www.cnblogs.com/craig/archive/2008/11/18/1335809.html |
$ Is_args |
1.0.8 |
|
$ Limit_rate |
1.0.8 |
Restrictions on connection speed; |
$ Nginx_version |
1.0.8 |
|
$ Pid |
1.0.8 |
|
$ Query_string |
1.0.8 |
Same as $ args; |
$ Realpath_root |
1.0.8 |
|
$ Remote_addr |
1.0.8 |
Client address; |
$ Remote_port |
1.0.8 |
Client port number; |
$ Remote_user |
1.0.8 |
Client user name, used for authentication; |
$ Request |
1.0.8 |
User request |
$ Request_body |
1.0.8 |
|
$ Request_body_file |
1.0.8 |
Name of the local file sent to the backend |
$ Request_completion |
1.0.8 |
|
$ Request_filename |
1.0.8 |
File path name of the current request |
$ Request_method |
1.0.8 |
Request methods, such as "GET" and "POST; |
$ Request_uri |
1.0.8 |
The requested URI with parameters; |
$ Scheme |
1.0.8 |
The protocol used, such as http or https, such as rewrite ^ (. +) $ scheme: // example.com $1 redirect; |
$ Sent_http_cache_control |
1.0.8 |
|
$ Sent_http_connection |
1.0.8 |
|
$ Sent_http_content_length |
1.0.8 |
|
$ Sent_http_content_type |
1.0.8 |
|
$ Sent_http_keep_alive |
1.0.8 |
|
$ Sent_http_last_modified |
1.0.8 |
|
$ Sent_http_location |
1.0.8 |
|
$ Sent_http_transfer_encoding |
1.0.8 |
|
$ Server_addr |
1.0.8 |
Server address. if you do not use listen to specify the server address, using this variable will initiate a system call to obtain the address (resulting in a waste of resources ); |
$ Server_name |
1.0.8 |
The name of the server to which the request arrives; |
$ Server_port |
1.0.8 |
The port number of the server to which the request arrives; |
$ Server_protocol |
1.0.8 |
Request Protocol version, "HTTP/1.0" or "HTTP/1.1 "; |
$ Uri |
1.0.8 |
The requested URI may be different from the original value, for example, after redirection |
Name version description (the variable list comes from the ngx_http_variables file)
$ Args 1.0.8 parameters in the request;
$ Binary_remote_addr 1.0.8 binary representation of the remote address
$ Body_bytes_sent 1.0.8 bytes of sent message body
$ Content_length 1.0.8 "Content-Length" in the HTTP request information ";
$ Content_type 1.0.8 "Content-Type" in the request information ";
$ Document_root 1.0.8 sets the value for the root path of the current request;
$ Document_uri 1.0.8 is the same as $ uri;
$ Host 1.0.8 indicates the "Host" in the request information. if the request does not contain the Host line, it is equal to the configured server name;
$ Hostname 1.0.8
$ Http_cookie 1.0.8 cookie information
$ Http_post 1.0.8
$ Http_referer 1.0.8 reference address
$ Http_user_agent 1.0.8 client proxy information
$ Http_via 1.0.8 the IP address of the last server to access. Http://www.cnblogs.com/deng02/archive/2009/02/11/1387911.html
$ Http_x_forwarded_for 1.0.8 is equivalent to the network access path. Http://www.cnblogs.com/craig/archive/2008/11/18/1335809.html
$ Is_args 1.0.8
$ Limit_rate 1.0.8 limit the connection rate;
$ Nginx_version 1.0.8
$ Pid 1.0.8
$ Query_string 1.0.8 is the same as $ args;
$ Realpath_root 1.0.8
$ Remote_addr 1.0.8 client address;
$ Remote_port 1.0.8 client port number;
$ Remote_user 1.0.8 client user name, used for authentication;
$ Request 1.0.8 user request
$ Request_body 1.0.8
$ Request_body_file 1.0.8 name of the local file sent to the backend
$ Request_completion 1.0.8
$ Request_filename 1.0.8 file path name of the current request
$ Request_method 1.0.8 indicates the request method, such as "GET" and "POST;
$ Request_uri 1.0.8 indicates the request URI with parameters;
$ Scheme 1.0.8 protocol, such as http or https, such as rewrite ^ (. +) $ scheme: // example.com $1 redirect;
$ Sent_http_cache_control 1.0.8
$ Sent_http_connection 1.0.8
$ Sent_http_content_length 1.0.8
$ Sent_http_content_type 1.0.8
$ Sent_http_keep_alive 1.0.8
$ Sent_http_last_modified 1.0.8
$ Sent_http_location 1.0.8
$ Sent_http_transfer_encoding 1.0.8
$ Server_addr 1.0.8 server address. if the server address is not specified by listen, using this variable will initiate a system call to obtain the address (resulting in a waste of resources );
$ Server_name 1.0.8 indicates the name of the server to which the request arrives;
$ Server_port 1.0.8 indicates the port number of the server to which the request arrives;
$ Server_protocol 1.0.8 request protocol version, "HTTP/1.0" or "HTTP/1.1 ";
$ Uri 1.0.8 the requested URI may be different from the original value, such as
The above describes the built-in blog variables, including the content, and hope to help those who are interested in the PHP Tutorial.