asp文件没有定义的错误(0x800A01FA)

来源:百度知道 编辑:UC知道 时间:2024/06/09 10:16:52
<!--#include file=../include/upload.inc-->
<%
dim upload,file,formName,formPath,filename,fileExt
dim ranNum
call UpFile()
'================无组件上传(upload_0)===============
sub UpFile()
set upload = new upload_file '建立上传对象
upload.GetData(1024*1024) '取得上传数据,此处即为1MB
if upload.err>0 then
select case upload.err
case 1
Response.Write"<script language='javascript'>alert('请选择你要上传的文件');history.go(-1);</script>"
case 2
Response.Write"<script language='javascript'>alert('上传文件超出了限制,最大只能为1MB');history.go(-1);</script>"
end select
exit sub
else
formPath=upload.form("filepath")'文件保存目录,此目录必须为程序可读写
if formPath="" then
formPath="filepath"
end if
'在目录后添加(/)
if right(fromPath,1)<>"/" then
formP

<!--#include file=../include/upload.inc-->

你检查这个文件。里面有没有定义类?

可能我表达错了。你打开upload.inc这个文件看看。里面是不是把upload_file类写好了。如果没写,当然不能识别。

set upload = new upload_file中的upload_file不是已经定义的类,系统不能识别。