MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual page 359

Table of Contents

Advertisement

Using the cfhttp Post Method
3
4
5
Reviewing the code
The following table describes the code and its function:
Code
<cffile destination="C:\temp\Junk"
<cfoutput>
The URL variable is: #URL.myurl# <br>
The Cookie variable is:
#Cookie.mycookie# <br>
The CGI variable is: #CGI.mycgi# <br>
The Form variable is:
#Form.emailaddress#. <br>
The file was uploaded to
#File.ServerDirectory#\#File.
ServerFile#.
</cfoutput>
<cfoutput>
The URL variable is: #URL.myurl# <br>
The Cookie variable is: #Cookie.mycookie6# <br>
The CGI variable is: #CGI.mycgi#. <br>
The Formfield variable is: #Form.emailaddress#. <br>
The file was uploaded to #File.ServerDirectory#\#File.ServerFile#.
</cfoutput>
Replace C:\temp\Junk with an appropriate directory path on your hard drive.
Save the file as
server.cfm
View posttest.cfm in your browser and look for the file in C:\temp\Junk (or your
replacement path).
nameconflict="Overwrite"
filefield="Form.myfile"
action="Upload"
attributes="Normal">
in
under your Web root directory.
myapps
Description
Write the transferred document to a file on
the server. Note that you send the file
using the
attribute, but the receiving page gets it as
a Form variable, not a File variable. This
tag creates File variables, as
cffile
follows.
Output information. The results are not
displayed by this page. They are passed
back to the posting page in its
cfhttp.filecontent
Output the value of the URL variable sent
in the HTTP request.
Output the value of the Cookie variable
sent in the HTTP request.
Output the value of the CGI variable sent
in the HTTP request.
Output the Form variable sent in the HTTP
request. Note that you send the variable
using the
the receiving page gets it as a Form
variable.
Output the results of the
page. This time, the variables really are
File variables.
cfhttpparam type="File"
variable.
type="formField"
attribute but
cffile
339
tag on this

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents