上传组件出问题 救救啊
为什么点上传后没显示上传提示:
警告: 网页已经过期 您申请的网页是用表单中提交的信息创建的。该网页已失效。由于有安全预警功能,Internet Explorer 不会自动再次提交您的信息。
要重新提交信息并查看该网页,请单击刷新按钮。
<!--#include FILE="webConfig.asp"-->
<html>
<head><title></title>
<link href="style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body {
background-color: #FFFFFF;
margin-top: 5px;
}
body,td,th {
font-size: 14px;
color: #000000;
font-weight: bold;
}
-->
</style></head>
<body>
<%
nowtime=now()
sj=cstr(year(nowtime))+"-"+right("0"+cstr(month(nowtime)),2)+"-"+right("0"+cstr(day(nowtime)),2)
dim upload,file,formName,formPath,iCount,pic
set upload=new upload_f '建立上传对象
'--------将日期转化成文件名--------
function MakedownName()
dim fname
fname = now()
fname = replace(fname,"-","")
fname = replace(fname," ","")
fname = replace(fname,":","")
fname = replace(fname,"PM","")
fname = replace(fname,"AM","")
fname = replace(fname,"上午","")
fname = replace(fname,"下午","")
fname = int(fname) + int((10-1+1)*Rnd + 1)
MakedownName=md5(fname)
end function
formPath="../UploadFile/BigFile/"
iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
newname=MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)
file.SaveAs Server.mappath(formPath&newname) ''保存文件
iCount=iCount+1
end if
next
response.write newname
'写入数据库
set Objrs=Server.CreateObject("ADODB.recordset")
SQL="select * From FileList where (ID is Null)"
Objrs.open sql,conn,1,3
Objrs.addnew
Objrs("FileName")=NewName
Objrs("UpAdmin")=session("admin")
Objrs("Fromwhere")="BigFile"
Objrs("SortName")="<font color=#0000FF>放大图</font>"
Objrs.UpDate
Objrs.close
%>
<script language="JavaScript">
parent.Scorpion.BigPicture.value+='<%=newname%>';
</script>
<%
set file=nothing
set upload=nothing ''删除此对象
%>
</body>
</html>
[ 本帖最后由 xnigdnpdc 于 2009-9-24 14:44 编辑 ]