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

这句判断的意思何在

WBOY
Release: 2016-06-13 12:19:23
Original
1046 people have browsed it

这句判断的意义何在
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']的值出现差异的情况,代码中可能会用到这个全局变量来路由

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template