| 名称 | 版本 | 说明(变量列表来源于文件 ngx_http_variables ) |
| $args | 1.0.8 | 请求中的参数; |
| $binary_remote_addr | 1.0.8 | 远程地址的二进制表示 |
| $body_bytes_sent | 1.0.8 | 已发送的消息体字节数 |
| $content_length | 1.0.8 | HTTP请求信息里的"Content-Length"; |
| $content_type | 1.0.8 | 请求信息里的"Content-Type"; |
| $document_root | 1.0.8 | 针对当前请求的根路径设置值; |
| $document_uri | 1.0.8 | 与$uri相同; |
| $host | 1.0.8 | 请求信息中的"Host",如果请求中没有Host行,则等于设置的服务器名; |
| $hostname | 1.0.8 | |
| $http_cookie | 1.0.8 | cookie 信息 |
| $http_post | 1.0.8 | |
| $http_referer | 1.0.8 | 引用地址 |
| $http_user_agent | 1.0.8 | 客户端代理信息 |
| $http_via | 1.0.8 | 最后一个访问服务器的Ip地址。http://www.cnblogs.com/deng02/archive/2009/02/11/1387911.html |
| $http_x_forwarded_for | 1.0.8 | 相当于网络访问路径。http://www.cnblogs.com/craig/archive/2008/11/18/1335809.html |
| $is_args | 1.0.8 | |
| $limit_rate | 1.0.8 | 对连接速率的限制; |
| $nginx_version | 1.0.8 | |
| $pid | 1.0.8 | |
| $query_string | 1.0.8 | 与$args相同; |
| $realpath_root | 1.0.8 | |
| $remote_addr | 1.0.8 | 客户端地址; |
| $remote_port | 1.0.8 | 客户端端口号; |
| $remote_user | 1.0.8 | 客户端用户名,认证用; |
| $request | 1.0.8 | 用户请求 |
| $request_body | 1.0.8 | |
| $request_body_file | 1.0.8 | 发往后端的本地文件名称 |
| $request_completion | 1.0.8 | |
| $request_filename | 1.0.8 | 当前请求的文件路径名 |
| $request_method | 1.0.8 | 请求的方法,比如"GET"、"POST"等; |
| $request_uri | 1.0.8 | 请求的URI,带参数; |
| $scheme | 1.0.8 | 所用的协议,比如http或者是https,比如rewrite^(.+)$$scheme://example.com$1redirect; |
| $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 | 服务器地址,如果没有用listen指明服务器地址,使用这个变量将发起一次系统调用以取得地址(造成资源浪费); |
| $server_name | 1.0.8 | 请求到达的服务器名; |
| $server_port | 1.0.8 | 请求到达的服务器端口号; |
| $server_protocol | 1.0.8 | 请求的协议版本,"HTTP/1.0"或"HTTP/1.1"; |
| $uri | 1.0.8 | 请求的URI,可能和最初的值有不同,比如经过重定向之类的 |
| 名称 | 版本 | 说明(变量列表来源于文件 ngx_http_variables ) |
| $args | 1.0.8 | 请求中的参数; |
| $binary_remote_addr | 1.0.8 | 远程地址的二进制表示 |
| $body_bytes_sent | 1.0.8 | 已发送的消息体字节数 |
| $content_length | 1.0.8 | HTTP请求信息里的"Content-Length"; |
| $content_type | 1.0.8 | 请求信息里的"Content-Type"; |
| $document_root | 1.0.8 | 针对当前请求的根路径设置值; |
| $document_uri | 1.0.8 | 与$uri相同; |
| $host | 1.0.8 | 请求信息中的"Host",如果请求中没有Host行,则等于设置的服务器名; |
| $hostname | 1.0.8 | |
| $http_cookie | 1.0.8 | cookie 信息 |
| $http_post | 1.0.8 | |
| $http_referer | 1.0.8 | 引用地址 |
| $http_user_agent | 1.0.8 | 客户端代理信息 |
| $http_via | 1.0.8 | 最后一个访问服务器的Ip地址。http://www.cnblogs.com/deng02/archive/2009/02/11/1387911.html |
| $http_x_forwarded_for | 1.0.8 | 相当于网络访问路径。http://www.cnblogs.com/craig/archive/2008/11/18/1335809.html |
| $is_args | 1.0.8 | |
| $limit_rate | 1.0.8 | 对连接速率的限制; |
| $nginx_version | 1.0.8 | |
| $pid | 1.0.8 | |
| $query_string | 1.0.8 | 与$args相同; |
| $realpath_root | 1.0.8 | |
| $remote_addr | 1.0.8 | 客户端地址; |
| $remote_port | 1.0.8 | 客户端端口号; |
| $remote_user | 1.0.8 | 客户端用户名,认证用; |
| $request | 1.0.8 | 用户请求 |
| $request_body | 1.0.8 | |
| $request_body_file | 1.0.8 | 发往后端的本地文件名称 |
| $request_completion | 1.0.8 | |
| $request_filename | 1.0.8 | 当前请求的文件路径名 |
| $request_method | 1.0.8 | 请求的方法,比如"GET"、"POST"等; |
| $request_uri | 1.0.8 | 请求的URI,带参数; |
| $scheme | 1.0.8 | 所用的协议,比如http或者是https,比如rewrite^(.+)$$scheme://example.com$1redirect; |
| $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 | 服务器地址,如果没有用listen指明服务器地址,使用这个变量将发起一次系统调用以取得地址(造成资源浪费); |
| $server_name | 1.0.8 | 请求到达的服务器名; |
| $server_port | 1.0.8 | 请求到达的服务器端口号; |
| $server_protocol | 1.0.8 | 请求的协议版本,"HTTP/1.0"或"HTTP/1.1"; |
| $uri | 1.0.8 | 请求的URI,可能和最初的值有不同,比如经过重定向之类的 |
| 名称 | 版本 | 说明(变量列表来源于文件 ngx_http_variables ) |
| $args | 1.0.8 | 请求中的参数; |
| $binary_remote_addr | 1.0.8 | 远程地址的二进制表示 |
| $body_bytes_sent | 1.0.8 | 已发送的消息体字节数 |
| $content_length | 1.0.8 | HTTP请求信息里的"Content-Length"; |
| $content_type | 1.0.8 | 请求信息里的"Content-Type"; |
| $document_root | 1.0.8 | 针对当前请求的根路径设置值; |
| $document_uri | 1.0.8 | 与$uri相同; |
| $host | 1.0.8 | 请求信息中的"Host",如果请求中没有Host行,则等于设置的服务器名; |
| $hostname | 1.0.8 | |
| $http_cookie | 1.0.8 | cookie 信息 |
| $http_post | 1.0.8 | |
| $http_referer | 1.0.8 | 引用地址 |
| $http_user_agent | 1.0.8 | 客户端代理信息 |
| $http_via | 1.0.8 | 最后一个访问服务器的Ip地址。http://www.cnblogs.com/deng02/archive/2009/02/11/1387911.html |
| $http_x_forwarded_for | 1.0.8 | 相当于网络访问路径。http://www.cnblogs.com/craig/archive/2008/11/18/1335809.html |
| $is_args | 1.0.8 | |
| $limit_rate | 1.0.8 | 对连接速率的限制; |
| $nginx_version | 1.0.8 | |
| $pid | 1.0.8 | |
| $query_string | 1.0.8 | 与$args相同; |
| $realpath_root | 1.0.8 | |
| $remote_addr | 1.0.8 | 客户端地址; |
| $remote_port | 1.0.8 | 客户端端口号; |
| $remote_user | 1.0.8 | 客户端用户名,认证用; |
| $request | 1.0.8 | 用户请求 |
| $request_body | 1.0.8 | |
| $request_body_file | 1.0.8 | 发往后端的本地文件名称 |
| $request_completion | 1.0.8 | |
| $request_filename | 1.0.8 | 当前请求的文件路径名 |
| $request_method | 1.0.8 | 请求的方法,比如"GET"、"POST"等; |
| $request_uri | 1.0.8 | 请求的URI,带参数; |
| $scheme | 1.0.8 | 所用的协议,比如http或者是https,比如rewrite^(.+)$$scheme://example.com$1redirect; |
| $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 | 服务器地址,如果没有用listen指明服务器地址,使用这个变量将发起一次系统调用以取得地址(造成资源浪费); |
| $server_name | 1.0.8 | 请求到达的服务器名; |
| $server_port | 1.0.8 | 请求到达的服务器端口号; |
| $server_protocol | 1.0.8 | 请求的协议版本,"HTTP/1.0"或"HTTP/1.1"; |
| $uri | 1.0.8 | 请求的URI,可能和最初的值有不同,比如经过重定向之类的 |
以上就介绍了blog内置变量,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号