MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual page 263

Developing web applications with coldfusion
Table of Contents

Advertisement

Chapter 15: Interacting with Remote Servers
You have POSTed to me.<BR>
<CFFILE DESTINATION="c:\temp\junk"
<CFOUTPUT>
</CFOUTPUT>
3.
Replace
4.
Save the file as
This example uses the CFFILE tag to upload the contents of the file variable to
c:\temp\junk.
It passes the five supported variable types to the page specified in the URL attribute.
The page that receives this data is also shown. It returns the value of the variables
which appears in the client's browser. This example uses the CFFILE tag in the page
that receives the Posted variables to upload the contents of the file variable to
c:\temp\junk.
The CFOUTPUT section in
variable, which is used to display the output from the
CFHTTP.FileContents
the contents of the
To return resuls of a CGI program:
1.
Create a new file in Studio.
2.
Modify the file so that it appears as follows:
<CFHTTP METHOD="Post"
</CFHTTP>
<CFOUTPUT>
</CFOUTPUT>
3.
Save the file as
NAMECONFLICT="Overwrite"
FILEFIELD="myfile"
ACTION="Upload"
ATTRIBUTES="Normal">
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.myformfield#. <BR>
with a path and filename on your hard drive.
c:\temp\junk
posttest.cfm
posttest.cfm
variable were left out, the browser output would be limited to
posttest.cfm
URL="http://www.thatsite.com/search.exe"
RESOLVEURL="Yes">
<CFHTTPPARAM TYPE="Formfield"
NAME="search"
VALUE="hello">
#CFHTTP.MimeType#<BR>
Length: #len(cfhttp.filecontent)# <BR>
Content: #htmlcodeformat(cfhttp.filecontent)#<BR>
getcgivars.cfm
in
under your Web root directory.
myapps
references the
CFHTTP.FileContent
server.cfm
file.
in
under your Web root directory.
myapps
237
file. If the

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents