operating system

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bert Melis

    operating system

    How can I determine the operating system of the server that's running my
    script?
  • Ken Robinson

    #2
    Re: operating system



    Bert Melis wrote:[color=blue]
    > How can I determine the operating system of the server that's running my
    > script?[/color]

    Look at $_SERVER['HTTP_USER_AGEN T']

    <http://www.php.net/reserved.variab les>

    Ken

    Comment

    • Chung Leong

      #3
      Re: operating system

      No clean, definitive way to do it IFAIK.

      You can check $_SERVER['SERVER_SOFTWAR E'] to see what web server is
      used. Often the name of the platform is included in the string.

      OS-specific info is often exposed as environment variables, so take a
      look in $_ENV.

      Comment

      • saint exupery

        #4
        Re: operating system

        he said the SERVER.

        there isn't a variable or function that gives the exact OS of the
        server, but $_SERVER['SERVER_SOFTWAR E'] should give u a good idea.

        Comment

        • Daniel Tryba

          #5
          Re: operating system

          Bert Melis <bert.melis@off site_remove_thi s_.be> wrote:[color=blue]
          > How can I determine the operating system of the server that's running my
          > script?[/color]

          Second define on:


          Comment

          • Mladen Gogala

            #6
            Re: operating system

            On Tue, 05 Jul 2005 17:56:42 +0200, Bert Melis wrote:
            [color=blue]
            > How can I determine the operating system of the server that's running my
            > script?[/color]

            <?
            $myos=PHP_OS;
            print "$myos\n";
            ?>

            --


            Comment

            Working...