This function returns ‘win’ if running on a Windows server and ‘linux’ if not running on a Windows server. It should be pretty easy to extend it to match other server operating systems, but this is all I needed.
function operating_system()
/* Returns 'win' for a Windows server, 'linux' for others */
{
$os_string = php_uname('s');
if (strpos(strtoupper($os_string), 'WIN')!==false)
{
return 'win';
}
else
{
return 'linux';
}
}
Thanks alot.