Home  >  Article  >  Backend Development  >  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
WBOYOriginal
2016-07-13 10:39:541254browse

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...
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