以下是详细信息。希望大家帮忙解答一下。
18 个解决方案
#1
你的dll没有注册吧,要
RegSvr32 x:\xxx.dll
进行注册
RegSvr32 x:\xxx.dll
进行注册
#2
注册了的
#3
貌似我注册的不是这个 是别的去了……
艾恩 是无组件上传类,这个怎么注册呢?
查了相关的 貌似都没找到要注册的呢。
#4
CreateObject的, 一定用是组件的。
有VS或COM Explorer的话可以查一下dll的progid是不是 anasp.AnUpload
有VS或COM Explorer的话可以查一下dll的progid是不是 anasp.AnUpload
#5
看看是否有权限去调用。看admint里的com+服务。
#6
VS没有,其次,COM Explorer也不会查看dll.
#7
能不能稍微详细一点?我不是很懂
#8
无组件不是使用Server,CreateObject创建的,直接New xClass
#9
要使用anasp.AnUpload无组件类,去看使用文档啊
http://www.google.com.hk/search?q=anasp.AnUpload&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:zh-CN:official&client=firefox-a
http://www.google.com.hk/search?q=anasp.AnUpload&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:zh-CN:official&client=firefox-a
#10
无组件版
set Upload=new AnUpLoad
组件版
set Upload=server.createobject("Anasp.AnUpload")
set Upload=new AnUpLoad
组件版
set Upload=server.createobject("Anasp.AnUpload")
#11
<title>上传</title>
<style type="text/css">
TABLE {border:1px green solid;margin-top:5px;}
TD{border-bottom:1px #dddddd solid;height:20px;padding:3px 0 0 5px;}
.head{background-color:#eeeeee;}
</style>
</head>
<body style="font-size:12px">
请选择一个文件进行上传:<br />
<form name="upload" method="post" action="婚纱img2.asp?act=upload" enctype="multipart/form-data">
选择文件:<input class="iFile" id="婚纱img2" type="file" name="婚纱img2" size="30" />
<input class="iButton" type="submit" value="上传" />
</form>
<%
if request.querystring("act")="upload" then
Dim Upload,successful,str
str=""
'===============================================================================
set Upload=server.createobject("anasp.AnUpload") '创建类实例
Upload.SingleSize=10*1024*1024 '设置单个文件最大上传限制,按字节计;默认为不限制
Upload.MaxSize=10*1024*1024 '设置最大上传限制,按字节计;默认为不限制
Upload.Exe="rar|jpg|bmp|gif" '设置合法扩展名,以|分割,忽略大小写
Upload.GetData() '获取并保存数据,必须调用本方法
'===============================================================================
if Upload.ErrorID>0 then '判断错误号,如果myUpload.ErrorID<=0表示正常
response.write Upload.Description '如果出现错误,获取错误描述
else
if Upload.forms("婚纱img2")<>"" then '这里判断你file1是否选择了文件
path=server.mappath("4f718909001304be") '文件保存路径(这里是files文件夹)
set tempCls=Upload.files("婚纱img2")
successful2=tempCls.SaveToFile(path) '以时间+随机数字为文件名保存
'successful=tempCls.SaveToFile(path,1) '如果想以原文件名保存,请使用本句
if successful2 then
str="upload/4f718909001304be/" & tempCls.FileName
end if
set tempCls=nothing
end if
end if
set Upload=nothing '销毁类实例
if str<>"" then
%>
<script type="text/javascript">
window.opener.document.all.婚纱img2.value='<%=str%>';
window.opener=null;
window.close();
</script>
<%
end if
end if
%>
</body>
</html>
以上是 婚纱img2.asp的内容
<!--#include file="UpLoad_Class.asp"-->
<%
on error resume next
Server.ScriptTimeout = 9999999
Dim Upload,successful,thisFile,allFiles,upPath,path
set Upload=new AnUpLoad
Upload.openProcesser=true '打开进度条显示
Upload.SingleSize=512*1024*1024 '设置单个文件最大上传限制,按字节计;默认为不限制,本例为512M
Upload.MaxSize=1024*1024*1024 '设置最大上传限制,按字节计;默认为不限制,本例为1G
Upload.Exe="*" '设置允许上传的扩展名
Upload.GetData()
if Upload.ErrorID>0 then
upload.setApp "faild",1,0 ,Upload.description
else
if Upload.files(-1).count>0 then
dim str
for each file in Upload.files(-1)
upPath=request.querystring("path")
path=server.mappath(upPath)
set tempCls=Upload.files(file)
upload.setApp "saving",Upload.TotalSize,Upload.TotalSize,tempCls.FileName
successful=tempCls.SaveToFile(path,1)
thisFile="{name:'" & tempCls.FileName & "',size:" & tempCls.Size & "}"
allFiles=allFiles & thisFile & ","
set tempCls=nothing
next
upload.setApp "saved",Upload.TotalSize,Upload.TotalSize,allFiles
else
upload.setApp "faild",1,0,"没有上传任何文件"
end if
end if
if err then upload.setApp "faild",1,0,err.description
set Upload=nothing
response.end
%>
以上是 upload.asp的内容
<style type="text/css">
TABLE {border:1px green solid;margin-top:5px;}
TD{border-bottom:1px #dddddd solid;height:20px;padding:3px 0 0 5px;}
.head{background-color:#eeeeee;}
</style>
</head>
<body style="font-size:12px">
请选择一个文件进行上传:<br />
<form name="upload" method="post" action="婚纱img2.asp?act=upload" enctype="multipart/form-data">
选择文件:<input class="iFile" id="婚纱img2" type="file" name="婚纱img2" size="30" />
<input class="iButton" type="submit" value="上传" />
</form>
<%
if request.querystring("act")="upload" then
Dim Upload,successful,str
str=""
'===============================================================================
set Upload=server.createobject("anasp.AnUpload") '创建类实例
Upload.SingleSize=10*1024*1024 '设置单个文件最大上传限制,按字节计;默认为不限制
Upload.MaxSize=10*1024*1024 '设置最大上传限制,按字节计;默认为不限制
Upload.Exe="rar|jpg|bmp|gif" '设置合法扩展名,以|分割,忽略大小写
Upload.GetData() '获取并保存数据,必须调用本方法
'===============================================================================
if Upload.ErrorID>0 then '判断错误号,如果myUpload.ErrorID<=0表示正常
response.write Upload.Description '如果出现错误,获取错误描述
else
if Upload.forms("婚纱img2")<>"" then '这里判断你file1是否选择了文件
path=server.mappath("4f718909001304be") '文件保存路径(这里是files文件夹)
set tempCls=Upload.files("婚纱img2")
successful2=tempCls.SaveToFile(path) '以时间+随机数字为文件名保存
'successful=tempCls.SaveToFile(path,1) '如果想以原文件名保存,请使用本句
if successful2 then
str="upload/4f718909001304be/" & tempCls.FileName
end if
set tempCls=nothing
end if
end if
set Upload=nothing '销毁类实例
if str<>"" then
%>
<script type="text/javascript">
window.opener.document.all.婚纱img2.value='<%=str%>';
window.opener=null;
window.close();
</script>
<%
end if
end if
%>
</body>
</html>
以上是 婚纱img2.asp的内容
<!--#include file="UpLoad_Class.asp"-->
<%
on error resume next
Server.ScriptTimeout = 9999999
Dim Upload,successful,thisFile,allFiles,upPath,path
set Upload=new AnUpLoad
Upload.openProcesser=true '打开进度条显示
Upload.SingleSize=512*1024*1024 '设置单个文件最大上传限制,按字节计;默认为不限制,本例为512M
Upload.MaxSize=1024*1024*1024 '设置最大上传限制,按字节计;默认为不限制,本例为1G
Upload.Exe="*" '设置允许上传的扩展名
Upload.GetData()
if Upload.ErrorID>0 then
upload.setApp "faild",1,0 ,Upload.description
else
if Upload.files(-1).count>0 then
dim str
for each file in Upload.files(-1)
upPath=request.querystring("path")
path=server.mappath(upPath)
set tempCls=Upload.files(file)
upload.setApp "saving",Upload.TotalSize,Upload.TotalSize,tempCls.FileName
successful=tempCls.SaveToFile(path,1)
thisFile="{name:'" & tempCls.FileName & "',size:" & tempCls.Size & "}"
allFiles=allFiles & thisFile & ","
set tempCls=nothing
next
upload.setApp "saved",Upload.TotalSize,Upload.TotalSize,allFiles
else
upload.setApp "faild",1,0,"没有上传任何文件"
end if
end if
if err then upload.setApp "faild",1,0,err.description
set Upload=nothing
response.end
%>
以上是 upload.asp的内容
#12
不是给你说无组件不能使用
set Upload=server.createobject("anasp.AnUpload")
的吗?
你怎么不改呢?
set Upload=server.createobject("anasp.AnUpload")
的吗?
你怎么不改呢?
#13
改了以后:
Microsoft VBScript runtime 错误 '800a01fa'
#14
我也不清楚到底是有组件 还是没有组件的版本
我说是无组件版本也是因为 有别人给我说的。
set Upload=server.createobject("anasp.AnUpload")
刚才没改是 因为
之前的VPS可以用
换了新VPS以后就没法用了
期间,没涉及到代码修改 知识数据的转移
我说是无组件版本也是因为 有别人给我说的。
set Upload=server.createobject("anasp.AnUpload")
刚才没改是 因为
之前的VPS可以用
换了新VPS以后就没法用了
期间,没涉及到代码修改 知识数据的转移
#15
server.createobject("anasp.AnUpload") 就代表有组件的,必须在服务器上注册组件,服务器你不能控制的话,只能使用无组件代码
#16
服务器可以控制,问题就是 我不知道该如何注册组件。
#17
到
http://dev.mo.cn/source_167.html
下载文件 解压,执行里面的注册或者反注册
或者自己注册
命令行执行
regsvr32 d:\文件夹名称\AnUpload.dll
#18
另外。下载的包中有例子代码
#1
你的dll没有注册吧,要
RegSvr32 x:\xxx.dll
进行注册
RegSvr32 x:\xxx.dll
进行注册
#2
注册了的
#3
貌似我注册的不是这个 是别的去了……
艾恩 是无组件上传类,这个怎么注册呢?
查了相关的 貌似都没找到要注册的呢。
#4
CreateObject的, 一定用是组件的。
有VS或COM Explorer的话可以查一下dll的progid是不是 anasp.AnUpload
有VS或COM Explorer的话可以查一下dll的progid是不是 anasp.AnUpload
#5
看看是否有权限去调用。看admint里的com+服务。
#6
VS没有,其次,COM Explorer也不会查看dll.
#7
能不能稍微详细一点?我不是很懂
#8
无组件不是使用Server,CreateObject创建的,直接New xClass
#9
要使用anasp.AnUpload无组件类,去看使用文档啊
http://www.google.com.hk/search?q=anasp.AnUpload&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:zh-CN:official&client=firefox-a
http://www.google.com.hk/search?q=anasp.AnUpload&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:zh-CN:official&client=firefox-a
#10
无组件版
set Upload=new AnUpLoad
组件版
set Upload=server.createobject("Anasp.AnUpload")
set Upload=new AnUpLoad
组件版
set Upload=server.createobject("Anasp.AnUpload")
#11
<title>上传</title>
<style type="text/css">
TABLE {border:1px green solid;margin-top:5px;}
TD{border-bottom:1px #dddddd solid;height:20px;padding:3px 0 0 5px;}
.head{background-color:#eeeeee;}
</style>
</head>
<body style="font-size:12px">
请选择一个文件进行上传:<br />
<form name="upload" method="post" action="婚纱img2.asp?act=upload" enctype="multipart/form-data">
选择文件:<input class="iFile" id="婚纱img2" type="file" name="婚纱img2" size="30" />
<input class="iButton" type="submit" value="上传" />
</form>
<%
if request.querystring("act")="upload" then
Dim Upload,successful,str
str=""
'===============================================================================
set Upload=server.createobject("anasp.AnUpload") '创建类实例
Upload.SingleSize=10*1024*1024 '设置单个文件最大上传限制,按字节计;默认为不限制
Upload.MaxSize=10*1024*1024 '设置最大上传限制,按字节计;默认为不限制
Upload.Exe="rar|jpg|bmp|gif" '设置合法扩展名,以|分割,忽略大小写
Upload.GetData() '获取并保存数据,必须调用本方法
'===============================================================================
if Upload.ErrorID>0 then '判断错误号,如果myUpload.ErrorID<=0表示正常
response.write Upload.Description '如果出现错误,获取错误描述
else
if Upload.forms("婚纱img2")<>"" then '这里判断你file1是否选择了文件
path=server.mappath("4f718909001304be") '文件保存路径(这里是files文件夹)
set tempCls=Upload.files("婚纱img2")
successful2=tempCls.SaveToFile(path) '以时间+随机数字为文件名保存
'successful=tempCls.SaveToFile(path,1) '如果想以原文件名保存,请使用本句
if successful2 then
str="upload/4f718909001304be/" & tempCls.FileName
end if
set tempCls=nothing
end if
end if
set Upload=nothing '销毁类实例
if str<>"" then
%>
<script type="text/javascript">
window.opener.document.all.婚纱img2.value='<%=str%>';
window.opener=null;
window.close();
</script>
<%
end if
end if
%>
</body>
</html>
以上是 婚纱img2.asp的内容
<!--#include file="UpLoad_Class.asp"-->
<%
on error resume next
Server.ScriptTimeout = 9999999
Dim Upload,successful,thisFile,allFiles,upPath,path
set Upload=new AnUpLoad
Upload.openProcesser=true '打开进度条显示
Upload.SingleSize=512*1024*1024 '设置单个文件最大上传限制,按字节计;默认为不限制,本例为512M
Upload.MaxSize=1024*1024*1024 '设置最大上传限制,按字节计;默认为不限制,本例为1G
Upload.Exe="*" '设置允许上传的扩展名
Upload.GetData()
if Upload.ErrorID>0 then
upload.setApp "faild",1,0 ,Upload.description
else
if Upload.files(-1).count>0 then
dim str
for each file in Upload.files(-1)
upPath=request.querystring("path")
path=server.mappath(upPath)
set tempCls=Upload.files(file)
upload.setApp "saving",Upload.TotalSize,Upload.TotalSize,tempCls.FileName
successful=tempCls.SaveToFile(path,1)
thisFile="{name:'" & tempCls.FileName & "',size:" & tempCls.Size & "}"
allFiles=allFiles & thisFile & ","
set tempCls=nothing
next
upload.setApp "saved",Upload.TotalSize,Upload.TotalSize,allFiles
else
upload.setApp "faild",1,0,"没有上传任何文件"
end if
end if
if err then upload.setApp "faild",1,0,err.description
set Upload=nothing
response.end
%>
以上是 upload.asp的内容
<style type="text/css">
TABLE {border:1px green solid;margin-top:5px;}
TD{border-bottom:1px #dddddd solid;height:20px;padding:3px 0 0 5px;}
.head{background-color:#eeeeee;}
</style>
</head>
<body style="font-size:12px">
请选择一个文件进行上传:<br />
<form name="upload" method="post" action="婚纱img2.asp?act=upload" enctype="multipart/form-data">
选择文件:<input class="iFile" id="婚纱img2" type="file" name="婚纱img2" size="30" />
<input class="iButton" type="submit" value="上传" />
</form>
<%
if request.querystring("act")="upload" then
Dim Upload,successful,str
str=""
'===============================================================================
set Upload=server.createobject("anasp.AnUpload") '创建类实例
Upload.SingleSize=10*1024*1024 '设置单个文件最大上传限制,按字节计;默认为不限制
Upload.MaxSize=10*1024*1024 '设置最大上传限制,按字节计;默认为不限制
Upload.Exe="rar|jpg|bmp|gif" '设置合法扩展名,以|分割,忽略大小写
Upload.GetData() '获取并保存数据,必须调用本方法
'===============================================================================
if Upload.ErrorID>0 then '判断错误号,如果myUpload.ErrorID<=0表示正常
response.write Upload.Description '如果出现错误,获取错误描述
else
if Upload.forms("婚纱img2")<>"" then '这里判断你file1是否选择了文件
path=server.mappath("4f718909001304be") '文件保存路径(这里是files文件夹)
set tempCls=Upload.files("婚纱img2")
successful2=tempCls.SaveToFile(path) '以时间+随机数字为文件名保存
'successful=tempCls.SaveToFile(path,1) '如果想以原文件名保存,请使用本句
if successful2 then
str="upload/4f718909001304be/" & tempCls.FileName
end if
set tempCls=nothing
end if
end if
set Upload=nothing '销毁类实例
if str<>"" then
%>
<script type="text/javascript">
window.opener.document.all.婚纱img2.value='<%=str%>';
window.opener=null;
window.close();
</script>
<%
end if
end if
%>
</body>
</html>
以上是 婚纱img2.asp的内容
<!--#include file="UpLoad_Class.asp"-->
<%
on error resume next
Server.ScriptTimeout = 9999999
Dim Upload,successful,thisFile,allFiles,upPath,path
set Upload=new AnUpLoad
Upload.openProcesser=true '打开进度条显示
Upload.SingleSize=512*1024*1024 '设置单个文件最大上传限制,按字节计;默认为不限制,本例为512M
Upload.MaxSize=1024*1024*1024 '设置最大上传限制,按字节计;默认为不限制,本例为1G
Upload.Exe="*" '设置允许上传的扩展名
Upload.GetData()
if Upload.ErrorID>0 then
upload.setApp "faild",1,0 ,Upload.description
else
if Upload.files(-1).count>0 then
dim str
for each file in Upload.files(-1)
upPath=request.querystring("path")
path=server.mappath(upPath)
set tempCls=Upload.files(file)
upload.setApp "saving",Upload.TotalSize,Upload.TotalSize,tempCls.FileName
successful=tempCls.SaveToFile(path,1)
thisFile="{name:'" & tempCls.FileName & "',size:" & tempCls.Size & "}"
allFiles=allFiles & thisFile & ","
set tempCls=nothing
next
upload.setApp "saved",Upload.TotalSize,Upload.TotalSize,allFiles
else
upload.setApp "faild",1,0,"没有上传任何文件"
end if
end if
if err then upload.setApp "faild",1,0,err.description
set Upload=nothing
response.end
%>
以上是 upload.asp的内容
#12
不是给你说无组件不能使用
set Upload=server.createobject("anasp.AnUpload")
的吗?
你怎么不改呢?
set Upload=server.createobject("anasp.AnUpload")
的吗?
你怎么不改呢?
#13
改了以后:
Microsoft VBScript runtime 错误 '800a01fa'
#14
我也不清楚到底是有组件 还是没有组件的版本
我说是无组件版本也是因为 有别人给我说的。
set Upload=server.createobject("anasp.AnUpload")
刚才没改是 因为
之前的VPS可以用
换了新VPS以后就没法用了
期间,没涉及到代码修改 知识数据的转移
我说是无组件版本也是因为 有别人给我说的。
set Upload=server.createobject("anasp.AnUpload")
刚才没改是 因为
之前的VPS可以用
换了新VPS以后就没法用了
期间,没涉及到代码修改 知识数据的转移
#15
server.createobject("anasp.AnUpload") 就代表有组件的,必须在服务器上注册组件,服务器你不能控制的话,只能使用无组件代码
#16
服务器可以控制,问题就是 我不知道该如何注册组件。
#17
到
http://dev.mo.cn/source_167.html
下载文件 解压,执行里面的注册或者反注册
或者自己注册
命令行执行
regsvr32 d:\文件夹名称\AnUpload.dll
#18
另外。下载的包中有例子代码