PHP Code can know the current OS is windows or not
CK 3788 Created at Updated at
58300
Below PHP code is for knowing the current OS working is Microsoft Windows or not. I have used below example code to call COM object in case that the OS is Microsoft Windows.
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
{
echo 'This is a server using Windows!';
}
else
{
echo 'This is a server not using Windows!';
}