Because some browsers do not support some CGI variables, ColdFusion always returns true when it tests for the existence of a CGI variable, regardless of whether the browser supports the variable. To determine if a CGI server exists, test for the availability, as the following example shows:

       if (myServer==cgi.SERVER_NAME)
             WriteOutput("Server exists");
             WriteOutput("Server does not exist");

To display all CGI variables, use the following code.


This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy