Get Operating System

From: Date: Sun, 29 Jul 2001 13:22:20 +0000
Subject: Get Operating System
Groups: php.general 
Request: Send a blank email to php-general+get-60099@lists.php.net to get a copy of this message
I tried to detect the Web-Servers operating system. Under Windows it's easy to read the environment variable "OS" (or one of the relatet Server Varaibles). Under Linux I found the following very strange behaviour: system("echo \$OSTYPE") correctly returns "linux-gnu" whereas getenv("OSTYPE") returns nothing Any idea why the simple getenv-solution does not work. Any simpler solution than calling the shell "echo"? Regards -- Rainer Rosenberger __________________________________________________________ NetAktiv, Beratung & Realisierung Dr. Rainer Rosenberger, Fürholzer Weg 6b, D-85375 Neufahrn Fon:+49 8165 66506, Fax:+49 8165 66507, Mobil:+49 172 7789381 mailto:Rosenberger@NetAktiv.de http://www.NetAktiv.de/ __________________________________________________________

« previous php.general (#60099) next »