浏览代码

Add global variable indicating server OS

pdontthink 16 年之前
父节点
当前提交
f211155993
共有 1 个文件被更改,包括 8 次插入0 次删除
  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
  *