It will have to open it up.
Use
That should getcha!
Paul Giesenhagen
QuillDesign
- Original Message -
From: Richard Crawford
To: CF-Talk
Sent: Tuesday, September 23, 2003 11:29 AM
Subject: Editing Files In-Line
Is there a way in Cold Fusion
Richard Crawford wrote:
Is there a way in Cold Fusion to make changes to a text file without
actually opening that file?
Well, that really depends on what you mean by open. Regardless though,
you can accomplish what you're looking for...
Suppose, for example, that I have a file myfile.html
Then if need be, you can do a cffile with action="" to write out the
modified file, or just dump sFileContent to the client.
This may not be the most elegant solution, but it'll work... (a regular
_expression_ replace might be much more efficient).
Shawn
-Original
H. now that mail is being sent as HTML, I'm not seeing tags that are
being discussed
-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 10:34 AM
To: CF-Talk
Subject: Re: Editing Files In-Line
It will have
Richard Crawford wrote:
>Is there a way in Cold Fusion to make changes to a text file without
>actually opening that file?
*something* will have to open it. :-)
>Suppose, for example, that I have a file "myfile.html" which contains
>the string "***REPLACE_THIS***". How can I have
This is the code I'm using:
cffile action=copy mode=0777
source=/space/usr/jrun4/servers/default/cfusion/DLC/include/disboard/wwwboard.html
destination=/space/usr/jrun4/servers/default/cfusion/DLC/Campus/Courses/#course.xURL#/extras/disboard/#nNumber#/
cffile action=read
I figured it out. My file was being changed successfully, but then
being overwritten by the original file because of a cffile
action=copy tag that I'd forgotten to remove.
So now I am off to get another cup of coffee. Oy.
7 matches
Mail list logo