主题:[讨论]关于sa-file up组件,我的代码有错误吗?
<FORM ACTION="" ENCTYPE="MULTIPART/FORM-DATA" METHOD="POST">
文件上传:<input type='file' size=40 name='imgname' id='i1'/>
<INPUT TYPE="SUBMIT" NAME="SUB1" VALUE="上传"><br>
</form>
<%
Set muupload = Server.CreateObject("SoftArtisans.FileUp")
muupload.Path = server.mappath("/action")
%>
<% if muupload.IsEmpty Then %>
<script>document.write ("您未选择文件!");</script>
<% ElseIf muupload.ContentDisposition <> "form-data" Then %>
<script>document.write ("请上传图片格式的文件!例如.jpg/.gif/.png/.bmp文件");</script>
<%Else %>
<%
on error resume next
muupload.Save
if Err <> 0 Then %>
<H1><FONT COLOR="#ff0000">保存文件过程中出现服务器错误.</FONT></H1>
<% Else
Response.Write("文件保存到: " & upl.ServerName)
set muupload=nothing
End If %>
<br>
文件大小:
<%
dim Byt
Byt=muupload.TotalBytes
if byt>1024 and byt<=1024*1024 then
byt=formatnumber(csng(byt/1024),3)&"KB"
elseif byt>1024*1024 then
byt=formatnumber(csng(byt/1024/1024),3)&"MB"
else
byt=byt&"B"
end if
response.write byt
%>
<br>
<% End If %>
总提示:
Server 对象 错误 'ASP 0177 : 800401f3'
Server.CreateObject 失败
/select_img.asp,行 14
800401f3
求救啊~~~~~~~~~~~
文件上传:<input type='file' size=40 name='imgname' id='i1'/>
<INPUT TYPE="SUBMIT" NAME="SUB1" VALUE="上传"><br>
</form>
<%
Set muupload = Server.CreateObject("SoftArtisans.FileUp")
muupload.Path = server.mappath("/action")
%>
<% if muupload.IsEmpty Then %>
<script>document.write ("您未选择文件!");</script>
<% ElseIf muupload.ContentDisposition <> "form-data" Then %>
<script>document.write ("请上传图片格式的文件!例如.jpg/.gif/.png/.bmp文件");</script>
<%Else %>
<%
on error resume next
muupload.Save
if Err <> 0 Then %>
<H1><FONT COLOR="#ff0000">保存文件过程中出现服务器错误.</FONT></H1>
<% Else
Response.Write("文件保存到: " & upl.ServerName)
set muupload=nothing
End If %>
<br>
文件大小:
<%
dim Byt
Byt=muupload.TotalBytes
if byt>1024 and byt<=1024*1024 then
byt=formatnumber(csng(byt/1024),3)&"KB"
elseif byt>1024*1024 then
byt=formatnumber(csng(byt/1024/1024),3)&"MB"
else
byt=byt&"B"
end if
response.write byt
%>
<br>
<% End If %>
总提示:
Server 对象 错误 'ASP 0177 : 800401f3'
Server.CreateObject 失败
/select_img.asp,行 14
800401f3
求救啊~~~~~~~~~~~