首页 > 其他 > 详细

ShotGraph例程

时间:2014-05-13 00:20:38      阅读:385      评论:0      收藏:0      [点我收藏+]

下面是HTML文件用于上传3个文件

<blockquote>
<p><HTML> <br>
<BODY BGCOLOR="#FFFFFF"> <br>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" 
ACTION="Upload.asp"> <br>
<INPUT TYPE=FILE NAME="FILE1"><BR> <br>
<INPUT TYPE=FILE NAME="FILE2"><BR> <br>
<INPUT TYPE=FILE NAME="FILE3"><BR> <br>
<br>
<INPUT TYPE=TEXT NAME="DESCRIPTION"><BR> <br>
<br>
<SELECT NAME="CATEGORY" MULTIPLE><br>
<OPTION>Image<br>
<OPTION>Text<br>
<OPTION>Source Code<br>
<OPTION>Archive<br>
</SELECT><BR><br>
<br>
<INPUT TYPE=SUBMIT VALUE="Upload!"> <br>
</FORM> <br>
</BODY> <br>
</HTML> <br>
</font></p>
</blockquote>

上传程序(Upload.asp):

< %
Set Upload = Server.CreateObject("Persits.Upload.1")

‘ Upload files
Upload.OverwriteFiles = False ‘ Generate unique names
Upload.SetMaxSize 1048576 ‘ Truncate files above 1MB
Upload.Save "c:\upload"

‘ Process all files received
For Each File in Upload.Files

‘ Save in the database as blob
File.ToDatabase "DSN=data;UID=sa;PWD=zzz;", _ 
"insert into mytable(blob) values(?)"

‘ Move to a different location
File.Copy "d:\archive\" & File.ExtractFileName
File.Delete
Next

‘ Display description field
Response.Write Upload.Form("Description") & "
"

‘ Display all selected categories
For Each Item in Upload.Form
If Item.Name = "Category" Then
Response.Write Item.Value & "
"
End If
Next
% >


ShotGraph例程,布布扣,bubuko.com

ShotGraph例程

原文:http://blog.csdn.net/tbmqzmavp/article/details/25557311

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!