Programming instructions
Working with ColdFusion pages 15
To create a ColdFusion page:
1 Open your editor and create a blank file.
2 Enter the following code on the page:
<html>
<head>
<title>A ColdFusion Page</title>
</head>
<body>
<strong>Hello world, this is a ColdFusion page.</strong>
<br>
<cfoutput> Today’s date is #DateFormat(Now())# </cfoutput>
</body>
</html>
Saving your ColdFusion page
In order for the ColdFusion server to process the page, you must save the ColdFusion
page on a computer where the ColdFusion server is installed. If you are creating your
pages on a local server (on which ColdFusion is running), then you can save the pages
locally; if you are using a remote server, then you must save your pages on that server.
To publish ColdFusion pages on the Internet, you must save the pages under the web-root
directory.
To save the code you just typed (to create a ColdFusion page):
1 Create a new directory called test under the web_root directory.
2 In the test directory, save the file as cfpage.cfm.
Browsing your code
To ensure that the code you wrote is working as expected, you must view the ColdFusion
page in a browser. The following procedure describes how to view the ColdFusion page
that you created earlier.
To view the ColdFusion page:
1 Open a web browser and go to the following URL:
http://127.0.0.1/test/cfpage.cfm
The address 127.0.0.1 refers to the localhost and is only valid when you view pages
locally. The URL for a remote site would include the IP address of the server where
ColdFusion is installed; for example: http://<serveripaddress>/test/cfpage.cfm.