Here's one way to do it.  Check yesterday's discussion archive for more suggestions.

To call the tempate which displays the code, put this code into any file you want to 
view:

view_source.cfm?file=#script_name#

To display the code (from a file named view_source.cfm linked as the above):

<cffile action="READ" file="#documentdirectory##file#" variable="contents">

<cfoutput>
<form>
<textarea cols=80 rows=25>
#contents#
</textarea>
</form>

</cfoutput>

--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net 
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------


> -----Original Message-----
> From: Norman Elton [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 10, 2000 3:52 PM
> To: CF-Talk
> Subject: Displaying Source Code
> 
> 
> I know there's a way to do this, but it slips my mind:
> 
> I need to show my source code, so it needs to bypass both 
> ColdFusion and the
> browser's processing engine. I think this is possible using 
> CFHEADER, but am
> not sure.
> 
> Thanks!
> 
> Norman Elton
> Information Technology
> College of William & Mary
> 
> ------------------------------------------------------------------
> ------------
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit 
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> _talk or send a message to [EMAIL PROTECTED] with 
> 'unsubscribe' in the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to