In PHP, PHP_OS constant or php_uname method will result WIN32, WININT, or Windows. So, you can check first 3 letters.
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
echo 'This is a server using Windows!';
}
Comments
Post a Comment