Explorar o código

Add global variable indicating server OS

pdontthink %!s(int64=16) %!d(string=hai) anos
pai
achega
f211155993
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      include/init.php

+ 8 - 0
include/init.php

@@ -74,6 +74,14 @@ if ((bool) ini_get('register_globals') &&
 global $null;
 $null = NULL;
 
+/**
+ * The global $server_os variable will be "windows" if
+ * we are working in a Windows environment or "*nix"
+ * otherwise.
+ */
+global $server_os;
+if (DIRECTORY_SEPARATOR == '\\') $server_os = 'windows'; else $server_os = '*nix';
+
 /**
  * [#1518885] session.use_cookies = off breaks SquirrelMail
  *