Creating SERVER Variables


Creating SERVER Variables

Much 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."




Macromedia ColdFusion MX 7 Certified Developer Study Guide
Macromedia ColdFusion MX 7 Certified Developer Study Guide
ISBN: 0321330110
EAN: 2147483647
Year: 2004
Pages: 389
Authors: Ben Forta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net