Re: Get Operating System

From: Date: Sun, 29 Jul 2001 20:18:57 +0000
Subject: Re: Get Operating System
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-60110@lists.php.net to get a copy of this message
You may want to use the predefined constant PHP_OS as described here : PHP Manual : Predefined Constants http://www.php.net/manual/en/language.constants.predefined.php Regards, Philip Rainer Rosenberger wrote: > 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 (#60110) next »