How do I access the value of PHP_OS?
| From: | David Scott | Date: | Thu, 08 Apr 2004 04:10:38 +0000 |
| Subject: | How do I access the value of PHP_OS? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-23395@lists.php.net to get a copy of this message | ||
In the PHP on Windows chapter of Programming PHP, there is mention of a constant, PHP_OS, that can be used to determine the OS running the server that PHP is on.
The example code is as follows,
<?php
if (PHP_OS == "WIN32" || PHP_OS == "WINNT") {
define("INCLUDE_DIR","c:\\myapps");
} else {
// some other platform
define("INCLUDE_DIR", "/include");
}
?>
However, rather than checking this value, I'd like to see if flat out. I tried this,
<?php
echo "PHP_OS";?> But it didn't work. How can I see the value contained in this constant?