guessWebServer() public static method

Guess the web server from $_SERVER['SERVER_SOFTWARE']
public static guessWebServer ( ) : string
return string
コード例 #1
0
ファイル: ElggRewriteTester.php プロジェクト: ibou77/elgg
 /**
  * Run the rewrite test and return a status array
  *
  * @param string $url  URL of rewrite test
  * @param string $path Root directory of Elgg with trailing slash
  *
  * @return array
  */
 public function run($url, $path)
 {
     $this->webserver = \ElggRewriteTester::guessWebServer();
     $this->rewriteTestPassed = $this->runRewriteTest($url);
     if ($this->rewriteTestPassed == FALSE) {
         if ($this->webserver == 'apache' || $this->webserver == 'unknown') {
             if ($this->createHtaccess($url, $path)) {
                 $this->rewriteTestPassed = $this->runRewriteTest($url);
             }
         }
     }
     return $this->returnStatus($url);
 }