Microsoft VBScript 运行时错误 '800a01f4'

Zhang_542800202_long 2009-09-14 12:38:32
上传图片时老出现如下字符,请大侠们帮忙看看

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>
...全文
328 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
wcgjj 2011-06-18
  • 打赏
  • 举报
回复
你本地测试的吧,放到外网服务器上应该就没问题了

28,405

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧