?? uploadedit.asp.bak
字號:
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<!-- #include file="upload.asp" -->
<%
'創建文件上載對象,FileUploader類在upload.asp中定義
Set Uploader = New FileUploader
'設置表單的字符集
Uploader.FormCharSet = "gb2312"
'執行上載
Uploader.Upload()
title = Uploader.Form("title")
If Uploader.Files.Count = 0 Then
Response.Write "沒有上載的文件."
Else
If Uploader.Form("docid") <> "" Then
For Each File In Uploader.Files.Items
If (Ucase(File.InputName) = "EDITFILE") Then
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "files", conn, adOpenDynamic, adLockOptimistic
RS.Find "fid="& Uploader.Form("docid")
RS("title") = title
RS("fsize") = File.FileSize
RS("fcontent").AppendChunk file.filedata
RS.Update
RS.Close
set RS = Nothing
Response.Write "修改已保存: " &title & "<br>"
Response.Write "大小: " & File.FileSize & " bytes<br>"
END IF
Next
else
For Each File In Uploader.Files.Items
If (Ucase(File.InputName) = "EDITFILE") Then
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "files", conn, adOpenDynamic, adLockOptimistic
RS.AddNew
RS("fname") = File.FileName
RS("title") = title
RS("fsize") = File.FileSize
RS("fcontent").AppendChunk file.filedata
RS.Update
RS.Close
set RS = Nothing
Response.Write "在線編輯的文件: " &title & "<br>"
Response.Write "大小: " & File.FileSize & " bytes<br>"
END IF
Next
End If
End If
Set Uploader = Nothing
Closeconn()
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -