mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
initial import
This commit is contained in:
31
lib/classes/server.class.php
Normal file
31
lib/classes/server.class.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
class server
|
||||
{
|
||||
private $_server_software;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->_server_software = isset($_SERVER['SERVER_SOFTWARE']) ? strtolower($_SERVER['SERVER_SOFTWARE']) : "";
|
||||
}
|
||||
|
||||
public function is_nginx()
|
||||
{
|
||||
if(strpos($this->_server_software, 'nginx') !== false)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function is_lighttpd()
|
||||
{
|
||||
if(strpos($this->_server_software, 'lighttpd') !== false)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function is_apache()
|
||||
{
|
||||
if(strpos($this->_server_software, 'apache') !== false)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user