Page 1 of 1

Determine server OS

Posted: Fri Aug 27, 2004 1:49 pm
by allelopath
How can I determine the OS of the server?
I see examples of how to determine the client OS, but not the server.
phpInfo() does not seem to have this informaiton.

Posted: Fri Aug 27, 2004 1:50 pm
by feyd
phpinfo does have it.. the constant PHP_OS has the OS PHP is running on..

Posted: Fri Aug 27, 2004 3:03 pm
by allelopath
I think PHP_OS is what i need, though i don't need phpInfo to access it.
It seems to be a constants that can be accessed directly, e.g.

// see if OS is windows
if ( strtoupper(substr(PHP_OS, 3)) == 'WIN')

Posted: Fri Aug 27, 2004 3:04 pm
by allelopath
thanks