Home  >  Article  >  Backend Development  >  这句判断的意思何在

这句判断的意思何在

WBOY
WBOYOriginal
2016-06-13 12:19:231010browse

这句判断的意义何在
if(isset($_SERVER['HTTP_X_REWRITE_URL'])){
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
$___s = explode(".",$_SERVER['REQUEST_URI']);
$____s = explode("?",$_SERVER['REQUEST_URI']);
$_SERVER['PATH_INFO'] = $____s[0];
$GLOBALS['is_iis'] = true;
}
如果重定向了,那么..................
------解决思路----------------------
IIS环境下首先域名重定向用$_SERVER[“HTTP_X_REWRITE_URL”]代替$_SERVER[‘REQUEST_URI’],apache环境则相反。
看这段代码是为了屏蔽在不同环境下$_SERVER['REQUEST_URI']的值出现差异的情况,代码中可能会用到这个全局变量来路由

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php获取ftp xml解决办法Next article:duquxml,该怎么处理