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 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2010
    Location
    UK
    Posts
    93
    Thanks
    26
    Thanked 0 Times in 0 Posts

    Question Does Windows support: $_SERVER['SCRIPT_FILENAME'] & $_SERVER['REMOTE_ADDR'] ?

    Hi,

    I am making a Modifiaction for a script and I am using the PHP code $_SERVER['SCRIPT_FILENAME'] and $_SERVER['REMOTE_ADDR']
    I would like it to work with both Linux and Windows Hosting.

    Can some tell me if it is suppoted before Windows 2003 and IIS 6?


    I have tested this on a Windows 2003 Server Hosting, running IIS 6, so I am presume it will be support on newer versions.

    Regards,
    CBG

  2. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    17,025
    Thanks
    4
    Thanked 2,668 Times in 2,637 Posts
    $_SERVER never makes a guarentee that it will be set; however, in my experience, both SCRIPT_FILENAME and REMOTE_ADDR will always exist in a web based environment. I have been able to retrieve these through both Apache and IIS.
    Best I know, these have been around since PHP3(ish). They should be available anytime after, and I suspect until the end of PHP's life.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


 

Posting Permissions

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