MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference page 81

Cfml language reference
Table of Contents

Advertisement

Chapter 1: ColdFusion Tags
Example
The following example creates a file with the information a user entered into an HTML
insert form:
<CFFILE ACTION="Write"
FILE="c:\files\updates\#Form.UpdateTitle#.txt"
OUTPUT="Created By: #Form.FullName#
Date: #Form.Date#
#Form.Content#">
If the user submitted a form where:
UpdateTitle="FieldWork"
FullName="World B. Frueh"
Date="10/30/98"
Content="We had a wonderful time in Cambridgeport."
ColdFusion would create a file named FieldWork.txt in the
directory and the file would contain the text:
Created By: World B. Frueh
Date: 10/30/98
We had a wonderful time in Cambridgeport.
This following examples show the use of the MODE attribute for UNIX. The first,
creates the file
group/other=read).
<CFFILE ACTION="Write"
FILE="/tmp/foo"
MODE=644>
This example appends to the specified file and makes permissions read/write (rw) for
all.
<CFFILE ACTION="Append"
DESTINATION="/home/tomj/testing.txt"
MODE=666
OUTPUT="Is this a test?">
The next example uploads a file and gives it
other=read/write).
CFFILE ACTION="Upload"
FILEFIELD="fieldname"
DESTINATION="/tmp/program.exe"
MODE=755>
with permissions defined as
/tmp/foo
c:\files\updates\
(owner=read/write,
rw-r—r--
permissions (owner/group/
rwx-rw-rw
57

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 4.5

Table of Contents