Best way to test for host operating system?

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

    #1

    Best way to test for host operating system?

    I am running under Windows at the present time and have found that I need to
    change code from linux implementation.

    How do I test to see which O/S I am running under?

    TIA,

    Larry Woods


  • Wolfgang Forstmeier

    #2
    Re: Best way to test for host operating system?

    Hi,

    try to use the PHP_OS predefined constant.

    More constants are shown here...




    lwoods wrote:[color=blue]
    > I am running under Windows at the present time and have found that I need to
    > change code from linux implementation.
    >
    > How do I test to see which O/S I am running under?
    >
    > TIA,
    >
    > Larry Woods
    >
    >[/color]

    Comment

    • lwoods

      #3
      Re: Best way to test for host operating system?

      That did it!

      Thanks

      Larry

      "Wolfgang Forstmeier" <wolfgang.forst meier@gmx.de> wrote in message
      news:df1lh9$7k8 $1@news.mch.sbs .de...[color=blue]
      > Hi,
      >
      > try to use the PHP_OS predefined constant.
      >
      > More constants are shown here...
      >
      > http://de2.php.net/manual/en/reserved.constants.php
      >
      >
      > lwoods wrote:[color=green]
      >> I am running under Windows at the present time and have found that I need
      >> to change code from linux implementation.
      >>
      >> How do I test to see which O/S I am running under?
      >>
      >> TIA,
      >>
      >> Larry Woods[/color][/color]


      Comment

      Working...