关于PATH_INFO SCRIPT_NAME SCRIPT_FILENAME REDIRECT_URL 详解

参考:http://www.nginx.cn/426.html  http://www.cnblogs.com/xiaochaohuashengmi/archive/2011/09/13/2175071.html

总结:PATH_INFO  SCRIPT_NAME SCRIPT_FILENAME REDIRECT_URL  这几个参数决定了 访问的url信息。
我的请求url:http://www.xxx.cn/Yxp/Index/test/name/1
PATH_INFO 脚本后的路劲引用地址。具体和配置有关。这里因为web服务器使用了rewrite功能所有访问路劲省略了index.php。


  [DOCUMENT_ROOT] => /var/www/html //web服务器的访问路径。 [SCRIPT_FILENAME] => /var/www/html/Yxp/index.php //脚本的绝对路径,注意当入口框架,再是获取脚本路径时的相关问题。 [REDIRECT_URL] => /Yxp/Index/test/name/1 //url的路径 [QUERY_STRING] => [REQUEST_URI] => /Yxp/Index/test/name/1 [SCRIPT_NAME] => /Yxp/index.php [PATH_INFO] => Index/test/name/1 [PATH_TRANSLATED] => /var/www/html/Index/test/name/1 [PHP_SELF] => /Yxp/index.php/Index/test/name/1
原文地址:https://www.cnblogs.com/swing07/p/5119173.html