Just context-include it into a content buffer, then mess with it:

<cfsavecontent variable="strCode">
        <cfest GetPageContext().Include( "../../codefile.cfm" ) />
</cfsavecontent> 

<!--- Remove line breaks. --->
<cfset strCode = REReplace(strCode, "[\r\n]+", "", "ALL") />


NOTE: The include from the PageContext object does not execute the inlcuded
code. It only includes it as if it were a text file.


.......................
Ben Nadel 
Web Developer
Nylon Technology
350 7th Ave.
Suite 1005
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com

Sanders: Lightspeed too slow?
Helmet: Yes we'll have to go right to ludacris speed.
-----Original Message-----
From: Eric J. Hoffman [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 10, 2006 2:27 PM
To: CF-Talk
Subject: File Include - Scrub Contents

Is this really easy or am I missing a thought?

Have a file I need to include in a process that is generated elsewhere.
So I call it by its dynamic name into my process; the catch is before
outputting that file I would like to scrub it of some info for formatting's
sake.

If I do a cfinclude, I don't get that chance, do I?  Any other method that
it workable without slowing us completely down?

Thanks!
--------------------------------------------------------


Eric J. Hoffman
Managing Partner
2081 Industrial Blvd
StillwaterMN55082
mail: [EMAIL PROTECTED]
www: http://www.ejhassociates.com
tel: 651.717.4105
fax: 651.717.4115
mob: 651.245.2717

--------------------------------------------------------

This message contains confidential information and is intended only for
[EMAIL PROTECTED] If you are not [email protected] you
should not disseminate, distribute or copy this e-mail. Please notify
[EMAIL PROTECTED] immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secure or error-free as information
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete,
or contain viruses. Eric J. Hoffman therefore does not accept liability for
any errors or omissions in the contents of this message, which arise as a
result of e-mail transmission. If verification is required please request a
hard-copy version.
--------------------------------------------------------



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237391
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to