Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / December 2005



Tip: Looking for answers? Try searching our database.

CFContent yields blank page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
v_roma - 27 Dec 2005 19:31 GMT
Hi everyone,
I am trying to secure non-cfm files by placing them above the wwwroot and
using CFContent, as I have seen suggested in these forums numerous times.  The
problem is that I cannot get it to work.  All I get are blank pages.  No error
message, no file, no nothing.  I tried the attached code (and other variations
on that theme).  The attached code properly lists the files in the folder but
when I try to open them, I get a blank page.  Any help would be much
appreciated as this is driving me crazy.  I'm using CF5, by the way.
Thanks,
Vasco

<cfparam name="fname" default="">
<cfdirectory action="LIST" directory="c:\webdocs" name="dirlist">
<cfoutput query="dirlist">
<li><a href="getfile.cfm?fname=#name#">#name#</a>
</cfoutput>
<cfif fname is not "">
<cfheader name="Content-Disposition" value="attachment; filename=#fname#">
<cfcontent type="application/unknown" file = "C:\webdocs\#fname#">
</cfif>
Mr Black - 27 Dec 2005 20:17 GMT
Works perfectly here under CF5.
v_roma - 30 Dec 2005 21:29 GMT
As it should.  I really don't know why this isn't working for me.  I've even
tried it with different OS/browser combinations.  Is there something on the
server level that could be the problem?  I know CFContent is an allowed tag, so
that shouldn't be it.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.