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:[EMAIL PROTECTED] http://www.NetAktiv.de/
> __________________________________________________________
> 
> 
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to