<!--- ============ FILEDUMP ============== --->
<CFFUNCTION name="fileDump" output="no" hint="CFDump to a HTML file. If no filename, outputs to 'filedump.html' in the current folder. Useful in debugging AbleCommerce redirects">
<CFARGUMENT name="var" type="any" required="No">
<CFARGUMENT name="fyl" type="string" required="No" default="#GetDirectoryFromPath(GetBaseTemplatePath())#filedump.html">
<CFARGUMENT name="action" type="string" required="No" default="WRITE">
<!---
###################################################
## Author: Noah Sepsenwol & George Jaros ##
## Script Name: ColdFusion FileDump Function ##
## Copyright 2006 Noah Sepsenwol, George Jaros ##
## & Web 2 Market ##
## www.georgejaros.com www.web2market.com ##
## This code may be replicated as long as ##
## this header statement is included. The ##
## Instructions below may be removed. ##
## History: ##
## 11.20.2006 ##
## Add optional param "action" ##
## {"write"|"append", default "write"} ##
## If "append", will create the file if no file##
## exists. ##
###################################################
--->
<!---
CFDump to a HTML file. If no filename, outputs to 'filedump.html' in the current folder. Useful in debugging redirects.
Usage: <cfset fileDump( someVariable )>
<cfset fileDump( someVariable, "somevariableDebug.html" )>
<cfset fileDump( someVariable, "somevariableDebug.html", "APPEND" )>
--->
<CFSAVECONTENT variable="dumpvar">
<CFDUMP var="#var#">
</CFSAVECONTENT>
<CFIF Action EQ "append" AND NOT FileExists( fyl )>
<CFFILE file="#fyl#" action="WRITE" output="" addnewline="No">
</CFIF>
<CFFILE file="#fyl#" action="#action#" output="#dumpvar#" addnewline="Yes">
</CFFUNCTION>
<!--- ============ END FILEDUMP ============== --->