码迷,mamicode.com
首页 > 其他好文 > 详细

ShotGraph例程

时间:2014-05-13 00:21:11      阅读:270      评论:0      收藏:0      [点我收藏+]

标签:des   style   code   c   ext   color   


下面是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例程

标签:des   style   code   c   ext   color   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!