大家帮我看一段代码,哪里怎么改正错误?

ivandream 2007-04-15 10:33:50
<%
PhotoPath="photo/"
MaxPhotoSize="102400"

if request("action")="upload" then
call uploadphoto()
else
call upform()
end if

sub uploadphoto()
dim upload,file
Dim fso
%>
<!--#INCLUDE FILE="inc/upload.inc" -->
<%
set upload=new upload_5xSoft

if upload.form("info")="" then
Errmsg=Errmsg+"<br>"+"<li>请输入图片名称."
founderr=true
else
info=trim(upload.form("info"))
end if

newtype=upload.form("newtype")
set file=upload.file("upfile")

fileExt=lcase(right(file.filename,4))
if file.filesize<100 then
Errmsg=Errmsg+"<br>"+"<li>请先选择你要上传的文件."
founderr=true
elseif fileEXT<>".gif" and fileEXT<>".jpg" then
Errmsg=Errmsg+"<br>"+"<li>所要上传文件的格式错误!."
founderr=true
elseif file.filesize>MaxPhotoSize then
Errmsg=Errmsg+"<br>"+"<li>文件大小超过了"&MaxPhotoSize/1024&"K限制."
founderr=true
end if

if founderr=true then
$$$$$$$$$$$call error(Errmsg)
exit sub
end if

set fso = CreateObject("Scripting.FileSystemObject")
path=server.mappath(PhotoPath)
if fso.folderexists(path)=false then
fso.createfolder(path)
end if
set fso=nothing

if right(PhotoPath,1)<>"/" then
PhotoPath=PhotoPath&"/"
end if

datetime=year(date)&month(date)&day(date)&hour(now)&minute(now)&second(now)
filename=file.filename
file.SaveAs Server.mappath(PhotoPath&filename)


错误提示是:
Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: 'error'

/长佳特/admin/picsend.asp,行 124


错误位置我用$$$$$$$$$$$做了记号
...全文
123 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
shinetsing 2007-04-15
  • 打赏
  • 举报
回复
把错误那行下一行的exit sub删了,过程最后要加上end sub,再试一下
nanyang9 2007-04-15
  • 打赏
  • 举报
回复
猜测error是VBScript中的关键词,换一个过程名试试.

28,390

社区成员

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

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