소스 검색

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
  *