CGI Variables Always Exist

CGI variables are special read-only variables made available by ColdFusion. CGI variables include server and browser variables, as well as ColdFusion environmental information. As CGI variable existence is so dependant on external factors (meaning that you’d always have to test for existence before using any of them, and then test for a value), ColdFusion always returns TRUE when testing IsDefined(“CGI variable”), even if the variable is not supported or not present. So, to test for the presence of a CGI variable, do a and test to see if it is NOT “”. (Applies to: ColdFusion All)

Leave a Reply