|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
要害词:ASP, 组件Components 文件:uploadtest.asp <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body bgcolor="#FFFFFF"> <form method="post" name="form1" enctype="multipart/form-data" action="showdata.asp"> <p>text1: <input type="text" name="text1"> </p> <p>text2: <input type="text" name="text2"> </p> <p>txtarea: <textarea name="textfield" cols="20" rows="10"></textarea> </p> <p>file: <input type="file" name="newfile"> </p> <p> <input type="submit" name="Submit" value="Submit"> <input type="reset" name="Reset" value="Reset"> </p> </form> </body> </html> 文件:showdata.asp <!--#INCLUDE FILE="upload.inc"--> <% \\\'Fields("xxx").Name 取得Form中xxx(Form Object)的名字 \\\'Fields("xxx").FilePath 假如是file Object 取得文件的完整路径 \\\'Fields("xxx").FileName 假如是file Object 取得文件名 \\\'Fields("xxx").ContentType 假如是file Object 取得文件的类型 \\\'Fields("xxx").Length 取得Form中xxx(Form Object)的数据长度 \\\'Fields("xxx").Value 取得Form中xxx(Form Object)的数据内容 Dim FormData,FormSize FormSize=Request.TotalBytes FormData=Request.BinaryRead(FormSize) Set Fields = GetUpload(FormData) response.write "text1:" & Fields("text1").Value & "<br>" & VbCrLf response.write "text2:" & Fields("text2").Value & "<br>" & VbCrLf response.write "textarea:" & Fields("textfield").Value & "<br>" & VbCrLf response.write Fields("newfile").FileName response.write Fields("newfile").ContentType Response.ContentType = Fields("newfile").ContentType If Fields("newfile").FileName<>"" Then Response.ContentType = Fields("newfile").ContentType response.binarywrite Fields("newfile").Value End If \\\'Response.BinaryWrite FormData %> 返回类别: 教程 上一教程: 利用WSH作定时工作流程 下一教程: 发送信息页面SEND.ASP--基于WEB的QQ程序3 您可以阅读与"《支持中文的无组件文件上传》-- 示例"相关的教程: · 《支持中文的无组件文件上传》-- UPLOAD.INC · 支持中文的无组件文件上传 · 中文的无组件文件上传ASP函数 · ASP多表单域无组件文件上传的例子 · 多表单域无组件文件上传的例子 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |