Microsoft VBScript 运行时错误 '800a01f4'
上传图片时老出现如下字符,请大侠们帮忙看看
Microsoft VBScript 运行时错误 '800a01f4'
变量未定义: 'upload_5xsoft'
\admin\upfile.asp, line 14
upfile.asp源代码
<%OPTION EXPLICIT%>
<% Server.ScriptTimeOut=5000 %>
<!--#include FILE="upload_5xsoft.inc"-->
<html>
<head>
<title>文件上传</title>
<link href="SSC_Admin.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><%
dim upload,file,FileExt,FormName,formPath,filepathname,RandFileName,iCount
set upload=new upload_5xsoft ''建立上传对象
'' Response.Write upload.Version&"<br><br>" ''显示上传类的版本
if upload.form("filepath")="" then ''得到上传目录
msg "请输入要上传至的目录!"
set upload=nothing
Response.End
else
formPath=upload.form("filepath")
''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
end if
iCount=0
for each formName in upload.objFile ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
FileExt=mid(File.FileName,InStrRev(File.FileName, ".")+1)
RandFileName=year(now)&"-"&month(now)&"-"&day(now)&"-"&hour(now)&minute(now)&second(now)&"."&FileExt
file.SaveAs Server.mappath(formPath&RandFileName) ''保存文件
'' Response.Write file.FilePath&file.FileName&" ("&file.FileSize&") => "&formPath&File.FileName&" 成功!<br>"
if left(formPath,3)="../" then
formPath=right(formPath,Len(formPath)-3) ''得到上传相对目录
End if
filepathname=formPath&RandFileName
iCount=iCount+1
end if
set file=nothing
next
'' Response.Write "<script>parent.document.myform.PicUrl1.value='"&formPath&File.FileName&"'</script>"
Response.Write"<script>parent."&upload.form("formname")&"."&upload.form("EditName")&".value='"&filepathname&"';</script>"
Response.Write"<script>parent.document.all."&upload.form("LayerName")&".style.visibility='hidden';</script>"
set upload=nothing ''删除此对象
%>
<script language="javascript">
window.alert("文件上传成功!");
window.history.back();
</script>
</td>
</tr>
</table>
</body>
</html>