Downloading file not the correct contents


hi,

 

i have link on page take me on page contains code below:

 

 

<cfoutput>
<cfset fpath = #getdirectoryfrompath(expandpath("*.*"))#>

<cfdirectory directory="#fpath#" name="files" action="list">

<table>
<cfloop query="files">
<tr><td>
<cfif #files.name# eq "test.cfm">

 
<a href="#files.name#"> #files.name# 

<cfheader name="content-disposition" value="attachment;filename=#files.name#">


</a>
</cfif>
</td>
</tr>
</cfloop>
</table>
</cfoutput>

 

when select test.cfm link, dialog box appears asking either save or open file.

 

the issue file, test.cfm, contents not being saved or displayed when open selected.

 

is there i'm missing?

 

 

thanks,

 

 

mike

i trying download text file, not cfm file.

 

 

mike



More discussions in ColdFusion


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account