我們是利用upload文件上傳組件進行文件上傳哦
<%Server
<!
<!
<html>
<head>
<title>文件上傳</title>
<link rel="stylesheet" href="<%=css%>" type="text/css">
<meta http
<body>
<%dim upload
set upload=new upload_
formPath="FJ/"
ly=upload
yhm=upload
zid=upload
ys=upload
yyzm = upload
zt=upload
ztid=upload
cz=upload
tp=upload
if tp = "http://" then tp = ""
ly=xrzh(ly)
if cz = "" then
fhlj = "bbs_list
else
fhlj = "bbs_tj
zid = ztid
end if
if yyzm <> session(sessionvalue & "yzm") then redirect fhlj
zhhf = jdsj
if yhm = "" then yhm = "游客"
for each formName in upload
set file = upload
if file
kzm = lcase(right(file
if instr("
if file
<script language="javascript">
alert("文件大於
window
</script>
<%end if
wjdx = file
wjm = formpath&replace(cstr(date)
file
dx = cstr(file
if len(dx) >
end if
next
if trim(zt) <>"" then
sql = "select * from yrwl_tb_lt order by id desc"
set rs = server
rs
if sjk <> "" then
if rs
id = "
else
id = cstr(rs("id")+
end if
end if
rs
if sjk = "" then
if rs
id = "
else
id = cstr(rs("id"))
end if
end if
rs("yhm") = yhm
rs("zt") = zt
rs("ly") = ly
if wjm = "" and tp <> "" then wjm = tp
rs("fj") = wjm
rs("dx") = dx
rs("dj") =
rs("zd") = "
rs("hf") =
if cz = "" then
rs("zid") = "s"
rs("zhhf") = jdsj & " "&yhm
rs("lb") = zid
else
rs("zid") = zid
sql = "select * from yrwl_tb_lt where id=" & zid
set rs
rs
rs
rs
rs
end if
rs("sj") = jdsj
rs
rs
if instr(yhm
exec="select * from yrwl_tb_admin where yhm=
rs
cs = rs("cs")
qm = rs("qm")
if isnull(cs) then cs =
if cs="" then cs=
exec="update yrwl_tb_admin set cs=" & cstr( cs +
conn
end if
if cz = "" then
if wjm <> "" then
kzm = lcase(right(wjm
if instr(wjm
xswjm = gqzh(wjm)
if len(wjm)>
tpxs = xswjm & "<br>附件下載:<a href=" & wjm & " target=_blank>[" & wjm &"]</a>"
else
tpxs = xswjm
end if
if tpxs = "" or (instr(wjm
end if
set fso = Server
set file=fso
do while file
wjnr = wjnr & file
loop
file
set file = nothing
set fso = nothing
if isnull(qm) then qm = ""
ly = replace(ly
wjnr = replace(wjnr
wjnr = replace(wjnr
wjnr = replace(wjnr
wjnr = replace(wjnr
wjnr = replace(wjnr
wjnr = replace(wjnr
wjnr = replace(wjnr
if instr(yhm
wjnr = replace(wjnr
wjnr = replace(wjnr
wj = Server
set myfileobject=server
set mytextfile=myfileobject
mytextfile
mytextfile
end if
set file=nothing
set upload=nothing
end if
conn
response
</body>
</html>
From:http://tw.wingwit.com/Article/program/net/201311/14414.html