I have an app where I'm opening a file (text file) on the server (with no file extension) and displaying the contents on my page in a TEXTAREA.
file.cfm
=====
<cfform action="" method="post">
<cflock timeout="5" name="readfile" type="READONLY">
<cffile action="" file="C:\mywork\textfile" variable="textvar">
</cflock>
<textarea style="width: 520px; height: 360px" name="textvar" id="textvar" wrap="off">
<cfoutput>#Trim(HTMLEditFormat(textvar))#</cfoutput>
</textarea>
<input type="submit" name="id" value="Save" height="10" class="navlinks">
I make the appropriate changes and then submit those changes to my action page.
action.cfm
========
<cfoutput>
<cfif #FORM.id# IS "Save">
<!--- Save File --->
<cflock timeout="5" name="writefile" type="EXCLUSIVE">
<cffile action="" file="C:\mywork\textfile" output="#FORM.textvar#" addnewline="Yes" attributes="normal">
</cflock>
<br>
</cfif>
This is the problem. Another program uses this file and it won't work properly because somehow the file format is being changed? If I open the file after my changes via the web interface with my text
editor and then just do a "save-as" and then run the program it works just fine.
What is CF doing to my file when saving it using the <cffile action="">
I don't understand...
Help
---------------------------------------------------
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---------------------------------------------------
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
