windows_or_not

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

windows_or_not [2013/09/12 22:49]
windows_or_not [2020/09/12 01:30] (current)
Line 1: Line 1:
 +====== Snippet: Windows or Not Windows? ====== 
 +<code php> 
 +/* 
 +Figure out if code is running on a Windows machine. 
 +*/ 
 +if (strtoupper(substr(php_uname("s"), 0, 3)) === 'WIN')  
 + $windows = TRUE; 
 +else 
 + $windows = FALSE; 
 +</code>