Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: Check which OS

  1. #1
    Regular Coder Masterslave's Avatar
    Join Date
    Dec 2005
    Posts
    287
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Check which OS

    How can I check which Operation System I use?
    I want to do this
    PHP Code:
    if (windows
    {
    setlocale(LC_ALL'nld_nld');
    }

    else
    {
    setlocale(LC_ALL'nl_NL');

    I looked in phpinfo but I can't find a super global the outputs which OS I'm using.

  • #2
    Regular Coder
    Join Date
    Jun 2004
    Posts
    565
    Thanks
    0
    Thanked 18 Times in 18 Posts
    Try PHP_OS.

    dumpfi
    "Failure is not an option. It comes bundled with the software."
    ....../)/)..(\__/).(\(\................../)_/)......
    .....(-.-).(='.'=).(-.-)................(o.O)...../<)
    ....(.).(.)("}_("}(.)(.)...............(.)_(.))Ż/.
    ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
    Little did the bunnies suspect that one of them was a psychotic mass murderer with a 6 ft. axe.

  • #3
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,093
    Thanks
    2
    Thanked 23 Times in 23 Posts
    I found a really cool script here that detects your browser and operating system, in case you're interested. Works great!
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #4
    Regular Coder Masterslave's Avatar
    Join Date
    Dec 2005
    Posts
    287
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by vinyl-junkie
    I found a really cool script here that detects your browser and operating system, in case you're interested. Works great!
    Thanks, that will do.

  • #5
    Regular Coder Masterslave's Avatar
    Join Date
    Dec 2005
    Posts
    287
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I haven't use the script yet but it is a bit big for what I want to achieve as given in my startpost.
    Anyone else with a solution to check which OS you're using?
    I could not imagine that PHP has not this function...

  • #6
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dumpfi already told you.
    PHP Code:
    if(PHP_OS == "WINNT") {
        
    // Is Windows NT.
    } else {
        
    // Not Windows NT.

    Of course you might not want to check for Windows NT, but it's the same principle.

  • #7
    Regular Coder Masterslave's Avatar
    Join Date
    Dec 2005
    Posts
    287
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Ok sorry, I didn't understand his post.
    But it works now, I've read at php.net about PHP_OS and php_uname().
    It's very clear to me now.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •