detecting operating system where php is installed
Posted: Sun Jun 29, 2003 8:49 pm
what is the best way to reliably attain which operating system any version of PHP is installed under, and store it as a variable.
I'm assuming you read an environment variable from phpinfo that is common to both unix/linux/windows versions of php.
e.g. $_ENV["OS"]; works fine under windows but is not present in the linux implementation of PHP
Maybe you read the values of phpinfo(2) 'general' and find the value of system in the array.
Any suggestions will be appreciated.
Andrew
I'm assuming you read an environment variable from phpinfo that is common to both unix/linux/windows versions of php.
e.g. $_ENV["OS"]; works fine under windows but is not present in the linux implementation of PHP
Maybe you read the values of phpinfo(2) 'general' and find the value of system in the array.
Any suggestions will be appreciated.
Andrew