要求不用request.binaryread,因为我有其他的信息要提交,需要用request.form来获取其他的信息,而request.binaryread和request.form不能一起用。
回答者:h4480 - 高级魔法师 六级 8-12 00:33
不好意思,我需要代码,一个系统太多要筛选了哦
===========================================================
回答者:blackstar_st - 魔法师 四级 8-12 01:38
upload_5xsoft.inc
这个里面用了request.binaryread了:(
难道真的没有办法了吗?
第1个回答 2008-08-12
拓网网络硬盘系统 v3.0
这套系统可以,我现在的网站也是用这套系统改办的
我网站地址
你可以去我网站看看,有测试帐号直接可以进入的
这套系统可以,我现在的网站也是用这套系统改办的
我网站地址
你可以去我网站看看,有测试帐号直接可以进入的
第2个回答 2008-08-12
用无组建上传类,关于upload_5xsoft.inc,百度一下,你就知道
<!--#include FILE="inc/upload_5xsoft.inc"-->
set upload=new upload_5xSoft
formPath="../uploadfiles/"
formPath2="../uploadfiles/small/"
art_id=cint(upload.form(trim("art_id")))
title=trim(upload.form("title"))
origin=trim(upload.form("origin"))
author=trim(upload.form("author"))
editor=trim(upload.form("editor"))
date=trim(upload.form("date"))
Content=trim(upload.form("Content"))
action=trim(upload.form("action"))
sort1id=cint(upload.form(trim("sort1id")))
sort2id=cint(upload.form(trim("sort2id")))
sort3id=cint(upload.form(trim("sort3id")))
fileSizeLimit=cint(upload.form(trim("fileSizeLimit")))
set rs=server.CreateObject("adodb.recordset")
select case action
case "add"
'response.write "<br><br>正在上传...<br>":response.flush'图片上传开始
set file=upload.file("file")
if file.FileSize<=0 then
response.write"<SCRIPT language=JavaScript>alert('未选择品图片');history.go(-1)</SCRIPT>"
else
if cint(file.filesize/1024)>fileSizeLimit then
response.write"<SCRIPT language=JavaScript>alert('您上传的图片大于规定大小("&fileSizeLimit&"K),请改变文件大小后再进行上传。');history.go(-1)</SCRIPT>"
response.End()
end if
FileExt = Mid(file.Filename, InStrRev(file.Filename, ".")+1)
FileExt = FixName(FileExt)
If Not ( CheckFileExt(FileExt) and CheckFileType(File.FileType) ) Then
'if trim(right(file.FileName,3))<>"jpg" and trim(right(file.FileName,3))<>"gif" then
response.write"<SCRIPT language=JavaScript>alert('您上传的文件必须是gif|jpg|jpeg|bmp|png图象文件,请将你上传的文件转换为以上格式后再进行上传。');history.go(-1)</SCRIPT>"
response.End()
end if
'FileName=gsid&MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)
FileName=MakedownName()&"."&FileExt
path=formPath&FileName
file.SaveAs Server.mappath(path)
picture=FileName
savepath=formPath&FileName
savepath2=formPath2&FileName
end if
set file=nothing
<!--#include FILE="inc/upload_5xsoft.inc"-->
set upload=new upload_5xSoft
formPath="../uploadfiles/"
formPath2="../uploadfiles/small/"
art_id=cint(upload.form(trim("art_id")))
title=trim(upload.form("title"))
origin=trim(upload.form("origin"))
author=trim(upload.form("author"))
editor=trim(upload.form("editor"))
date=trim(upload.form("date"))
Content=trim(upload.form("Content"))
action=trim(upload.form("action"))
sort1id=cint(upload.form(trim("sort1id")))
sort2id=cint(upload.form(trim("sort2id")))
sort3id=cint(upload.form(trim("sort3id")))
fileSizeLimit=cint(upload.form(trim("fileSizeLimit")))
set rs=server.CreateObject("adodb.recordset")
select case action
case "add"
'response.write "<br><br>正在上传...<br>":response.flush'图片上传开始
set file=upload.file("file")
if file.FileSize<=0 then
response.write"<SCRIPT language=JavaScript>alert('未选择品图片');history.go(-1)</SCRIPT>"
else
if cint(file.filesize/1024)>fileSizeLimit then
response.write"<SCRIPT language=JavaScript>alert('您上传的图片大于规定大小("&fileSizeLimit&"K),请改变文件大小后再进行上传。');history.go(-1)</SCRIPT>"
response.End()
end if
FileExt = Mid(file.Filename, InStrRev(file.Filename, ".")+1)
FileExt = FixName(FileExt)
If Not ( CheckFileExt(FileExt) and CheckFileType(File.FileType) ) Then
'if trim(right(file.FileName,3))<>"jpg" and trim(right(file.FileName,3))<>"gif" then
response.write"<SCRIPT language=JavaScript>alert('您上传的文件必须是gif|jpg|jpeg|bmp|png图象文件,请将你上传的文件转换为以上格式后再进行上传。');history.go(-1)</SCRIPT>"
response.End()
end if
'FileName=gsid&MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)
FileName=MakedownName()&"."&FileExt
path=formPath&FileName
file.SaveAs Server.mappath(path)
picture=FileName
savepath=formPath&FileName
savepath2=formPath2&FileName
end if
set file=nothing
参考资料: