This is a method for reading in variables and constants from an XML file. In this example, we are reading them in to the application scope. This can be useful for sharing variables across applications or servers, and to keep things organized.
Take the following XML file with some application constants.
If application.vars.dsn is not defined or we pass in url.flush to a page in our application, the code will parse the XML file and assign application variables accordingly. The url.flush mechanism is a handy way to reflect changes in the XML file without waiting for the application to timeout or a server reboot.
If you <cfdump var="#application.vars#">, you will see the two application variables defined in the XML file.
All ColdFusion Tutorials By Author: Redmanz
Send Page Url to A Friend
A simple script where a user can click a link that will take the current templates url and pass it to a email form which they can than fill in with their friends emails addresses to send their friends your site address. Author:Redmanz Views: 39,196 Posted Date: Saturday, November 23, 2002
Advanced Form Checking
This tutorial places the submitted form values into a session, than error checks them. If there is an error it will show the form again with the previous values the user entered pre-entered in the form. It will also tell the user which form fields had errors in them. Author:Redmanz Views: 53,958 Posted Date: Tuesday, November 26, 2002
Dynamic Sorting
This tutorial shows the basics of allowing your end-users to dynamically sort the order in which they view your records. You can have as many sort orders as you have fields viewed! Author:Redmanz Views: 34,213 Posted Date: Thursday, December 5, 2002
Duplicate Data Checking
This tutorial uses a opt-in mailing list as an example. After the end-user enters their information the information goes to an action page which checks to see if the users email address already exists in the database. If it exists it lets them know and will not enter the duplicate data, if it does not exist it enters them into the mailing list. Author:Redmanz Views: 36,916 Posted Date: Monday, December 9, 2002
Guest Book (Part 1 / 2)
This Guestbook is part one of a two part tutorial. This part deals with the guest book itself the second part will build a administration area for this guestbook. The guest book submits to two tables in a mySql database the first table being for the actual guest book display template and the second table to be used for an opt-in mailing list. Author:Redmanz Views: 51,764 Posted Date: Friday, December 13, 2002
Guest Book (Part 2 / 2)
This is part two of my guestbook tutorial, in part one we created the actual guestbook. In this part we will now look at creating an administration area for our guestbook. In this admin area we will be able to edit and delete guestbook entries as well as add or delete administrators. Author:Redmanz Views: 34,282 Posted Date: Saturday, December 21, 2002
Show Source to Friends
Not really a tutorial but some code to help you solve programming problems by showing your code online to your friends or associates. Author:Redmanz Views: 25,576 Posted Date: Tuesday, February 18, 2003