MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual page 358

Table of Contents

Advertisement

338
3
4
Reviewing the code
The following table describes the code and its function:
Code
<cfhttp method="Post"
<cfhttpparam type="Cookie"
<cfhttpparam type="CGI"
<cfhttpparam type="Formfield"
</cfhttp>
<cfoutput>
File Content:<br>
Mime Type:
</cfoutput>
To view the variables:
1
2
</body>
</html>
Replace the path to the GIF file to a path on your server.
Save the file as posttest.cfm in
url="http://127.0.0.1/myapps/
server.cfm">
value="cookiemonster"
name="mycookie6">
value="cgivar "
name="mycgi">
<cfhttpparam type="URL"
value="theurl"
name="myurl">
value="wbfreuh@macromedia.com"
name="emailaddress">
<cfhttpparam type="File"
name="myfile"
file="c:\testImage.gif">
#cfhttp.filecontent#<br>
#cfhttp.MimeType#<br>
Create a new file in ColdFusion Studio.
Modify the file so that it appears as follows:
<cffile destination="C:\temp\Junk"
nameconflict="Overwrite"
filefield="Form.myfile"
action="Upload"
attributes="Normal">
Chapter 18 Interacting with Remote Servers
under your Web root directory.
myapps
Description
Post an HTTP request to the specified
page.
Send a cookie in the request.
Send a CGI variable in the request.
Send a URL in the request.
Send a Form field in the request.
Send a file in the request.
The
</cfhttp>
Display the contents of the file that the
page that is posted to creates by
processing the request. In this example,
this is the output from the
server.cfm.
Display the MIME type of the created file.
tag ends the http request.
cfoutput
tag in

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 5

Table of Contents