Microsoft VBScript 运行时错误 '800a01fa'
类没有被定义: 'upload_F'
\wwwroot\admin\upload1.asp, line 24
-------------------------------------------------------------------------------
Host by NetBox Version 2.8 Build 4128
upload1.asp的原代码(大家帮忙看看哪里不对,谢谢啦)
<html>
<head>
<link href="../css/css.css" rel="stylesheet" type="text/css">
<title>添加文件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
background-color: #efe8d7;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
}
-->
</style></head>
<body bgcolor="#efe8d7">
<%
dim upload,file,formName,formPath,iCount
%>
<!--#include file="INC/UPLOAD.INC"-->
<%
set upload=new upload_F ''建立上传对象
action=trim(upload.form("filepath"))
'--------将日期转化成文件名--------
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=cStr(fname)
end function
select case action
case "web"
formPath="../webimg/"
case "link"
formPath="../linkimg/"
end select
iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
s="." & mid(file.FileName,InStrRev(file.FileName, ".")+1)
if inStr(":.jpg:.gif:.JPG:.GIF:",":" & s & ":") = 0 then
response.write "文件格式不正确 [ <a href=#3333 onclick=history.go(-1)>重新上传</a> ]"
response.end
end if
if file.FileSize>0 and file.FileSize<10241 then ''如果 FileSize > 0 说明有文件数据
newname=MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)
file.SaveAs Server.mappath(formPath&newname) ''保存文件
iCount=iCount+1
else
response.write "未找到文件/文件大于10K [<A HREF=javascript:history.back(1)>返回</A>]"
response.end
end if
next
%>
<%
response.write "<script language='JavaScript'>parent.document.forms[0].upimg.value='"& newname &"'</script>"
%><div align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#efe8d7">
<TR>
<TD width="100%" height="26">上传图片成功,请点下面按钮提交![<a href="upload.asp?action=<%=action%>">重新上传</a>]</TD>
</TR>
</table>
</div>
<%
set file=nothing
set upload=nothing ''删除此对象
%>
</body>
</html>