Creating SERVER VariablesMuch of what you know about APPLICATION variables can be applied to SERVER variables. The most obvious deviation, however, is the fact that the use of special tags or files is not required to enable them. SERVER variables are automatically available to any page in any application on the server. Table 10.1 lists some default SERVER variables. To see a list of all SERVER variables, you can use the following code snippet: <cfdump var="#SERVER#"> Variables in the SERVER scope can be read and written to, but generally the SERVER scope should not be used for storage in your own applications. CAUTION Overwriting default system SERVER variables is a bad idea. Usually, the manipulation of SERVER variables is performed only during debugging. CAUTION Don't arbitrarily reference SERVER variables listed in Table 10.1always first use IsDefined() to check that they exist. Macromedia reserves the right to change these as it sees fit. NOTE APPLICATION and SERVER variables are structures. Therefore, you can also use the structure functions to manage them.
Structures and their functions are discussed in Chapter 15, "Structures." |