beautypg.com

Define php server variables, Define a coldfusion client variable, Define a coldfusion cookie variable – Adobe Dreamweaver CC 2015 User Manual

Page 583

background image

576

Dynamic sites, pages and web forms

Last updated 6/3/2015

4

Specify the variable in the collection that you want to access, and click OK.

For example, if you want to access the information in the Request.ServerVariables("HTTP_USER_AGENT")
variable, enter the argument HTTP_USER_AGENT. If you want to access the information in the
Request.Form("lastname") variable, enter the argument lastname.

The request variable appears in the Bindings panel.

Define PHP server variables

Define server variables as a source of dynamic content for PHP pages. The PHP server variables appear in the Bindings
panel.

1

Open the Bindings panel (Window > Bindings).

2

Click the Plus (+) button, and select the variable from the pop-up menu.

3

In the Request Variable dialog box, enter the name of the variable (for example, REQUEST_METHOD), and click
OK.

For more information, search for the keyword $_SERVER in the PHP documentation.

Define a ColdFusion client variable

Define a ColdFusion client variable as a source of dynamic content for the page. The newly defined ColdFusion client
variables appear in the Bindings panel.

In the Client Variable dialog box, enter the name of the variable, and click OK.

For example, to access the information in the Client.LastVisit ColdFusion variable, enter LastVisit.

Client variables are variables created in the code to associate data with a specific client. Client variables maintain the
application’s state as the user moves from page to page within the application, as well as from session to session.

Client variables can be user-defined or built-in. The following table lists the built-in ColdFusion client variables:

Define a ColdFusion cookie variable

Cookie variables are created in the code, and access information contained in cookies passed to the server by a browser.
The defined cookie variable appears in the Bindings panel.

In the Cookie Variable dialog box, enter the name of the cookie variable, and click OK.

Variable

Description

Client.CFID

An incremental ID for each client that connects to the server.

Client.CFTOKEN

A randomly generated number used to uniquely identify a
particular client.

Client.URLToken

A combination of CFID and CFTOKEN to be passed between
templates when cookies are not used.

Client.LastVisit

Records the timestamp of the last visit made by a client.

Client.HitCount

The number of page requests tied to a single client (tracked using
CFID and CFTOKEN).

Client.TimeCreated

Records the timestamp when CFID and CFTOKEN were first
created for a particular client.