Home > Backend Development > PHP Tutorial > PHP detects whether the server environment is APACHE or IIS_PHP tutorial

PHP detects whether the server environment is APACHE or IIS_PHP tutorial

WBOY
Release: 2016-07-13 10:39:54
Original
1298 people have browsed it

Example

 if(isset($_SERVER['HTTP_X_REWRITE_URL'])) // IIS

else if(isset($_SERVER['ORIG_PATH_INFO'])) // IIS 5.0 CGI

//The above two lines of code are copied from Yii.

//For reference only

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/727591.htmlTechArticleExample if(isset($_SERVER['HTTP_X_REWRITE_URL'])) // IIS else if(isset($_SERVER ['ORIG_PATH_INFO'])) // IIS 5.0 CGI // The above two lines of code are in yii, copied as they are. //Only for reference...
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