首页 > 后端开发 > php教程 > Nginx:fastcgi_param详解

Nginx:fastcgi_param详解

WBOY
发布: 2016-07-29 09:00:44
原创
2322 人浏览过

<code>fastcgi_param  SCRIPT_FILENAME    <span>$document_root</span><span>$fastcgi_script_name</span>;<span>#脚本文件请求的路径</span>
fastcgi_param  QUERY_STRING       <span>$query_string</span>; <span>#请求的参数;如?app=123</span>
fastcgi_param  REQUEST_METHOD     <span>$request_method</span>; <span>#请求的动作(GET,POST)</span>
fastcgi_param  CONTENT_TYPE       <span>$content_type</span>; <span>#请求头中的Content-Type字段</span>
fastcgi_param  CONTENT_LENGTH     <span>$content_length</span>; <span>#请求头中的Content-length字段。</span>fastcgi_param  SCRIPT_NAME        <span>$fastcgi_script_name</span>; <span>#脚本名称 </span>
fastcgi_param  REQUEST_URI        <span>$request_uri</span>; <span>#请求的地址不带参数</span>
fastcgi_param  DOCUMENT_URI       <span>$document_uri</span>; <span>#与$uri相同。 </span>
fastcgi_param  DOCUMENT_ROOT      <span>$document_root</span>; <span>#网站的根目录。在server配置中root指令中指定的值 </span>
fastcgi_param  SERVER_PROTOCOL    <span>$server_protocol</span>; <span>#请求使用的协议,通常是HTTP/1.0或HTTP/1.1。  </span>fastcgi_param  GATEWAY_INTERFACE  CGI/<span>1.1</span>;<span>#cgi 版本</span>
fastcgi_param  SERVER_SOFTWARE    nginx/<span>$nginx_version</span>;<span>#nginx 版本号,可修改、隐藏</span>fastcgi_param  REMOTE_ADDR        <span>$remote_addr</span>; <span>#客户端IP</span>
fastcgi_param  REMOTE_PORT        <span>$remote_port</span>; <span>#客户端端口</span>
fastcgi_param  SERVER_ADDR        <span>$server_addr</span>; <span>#服务器IP地址</span>
fastcgi_param  SERVER_PORT        <span>$server_port</span>; <span>#服务器端口</span>
fastcgi_param  SERVER_NAME        <span>$server_name</span>; <span>#服务器名,域名在server配置中指定的server_name</span><span>#fastcgi_param  PATH_INFO           $path_info;#可自定义变量</span><span># PHP only, required if PHP was built with --enable-force-cgi-redirect</span><span>#fastcgi_param  REDIRECT_STATUS    200;</span>在php可打印出上面的服务环境变量
如:<span>echo</span><span>$_SERVER</span>[<span>'REMOTE_ADDR'</span>]</code>
登录后复制
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了Nginx:fastcgi_param详解,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板