| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 543 人关注过本帖
标题:[求助]上传相片的时候遇到程序错误,帮助
只看楼主 加入收藏
holianchao
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-4-25
收藏
 问题点数:0 回复次数:0 
[求助]上传相片的时候遇到程序错误,帮助

Request 对象 错误 'ASP 0104 : 80004005'

不允许操作

/album/save.asp,行 91


谢谢了


下边的是save.asp的文件

<!--#include file="check.asp" -->
<%select case request("ntype")
case "groupadd"
groupadd
case "groupedit"
groupedit
case "groupdel"
groupdel
case "photoadd"
photoadd
case "photoedit"
photoedit
case "photodel"
photodel
case "music"
music
case "modify"
modify
end select
sub modify
uname=Trim(Request("uname"))
pass0=Trim(Request("pass0"))
pass2=Trim(Request("pass2"))
if uname="" then ero"用户名不能为空",1
if pass0<>password then ero"验证密码不正确",1
if pass2<>"" then
conn.execute("update [master] set [password]='"&pass2&"' where username='"&username&"'")
Response.Cookies("Onez_Photo")("password")=pass2
end if
Response.Cookies("Onez_Photo")("username")=uname
conn.execute("update [master] set username='"&uname&"' where username='"&username&"'")
ero"资料修改成功","modify.asp"
end sub
sub groupadd
title=Trim(Request.Form("Title"))
viewtype=Trim(Request.Form("viewtype"))
viewpass=Trim(Request.Form("viewpass"))
if title="" then ero"请正确输入文件夹名称",1
if viewtype="1" and viewpass="" then ero"请设置为需要密码才能访问,请正确输入密码",1
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open "select title,viewtype,viewpass from picgroup where title='"&title&"'",conn,1,3
if not(rs.bof and rs.eof) then ero"您所填写的文件夹已经存在,请更换",1
rs.addnew
rs(0)=title
rs(1)=viewtype
rs(2)=viewpass
rs.update
rs.close
set rs=nothing
suc"添加文件夹成功","manage.asp"
end sub
sub groupedit
id=Trim(Request.Form("id"))
title=Trim(Request.Form("Title"))
viewtype=Trim(Request.Form("viewtype"))
viewpass=Trim(Request.Form("viewpass"))
if title="" then ero"请正确输入文件夹名称",1
if viewtype="1" and viewpass="" then ero"请设置为需要密码才能访问,请正确输入密码",1
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open "select title,viewtype,viewpass from picgroup where id="&id,conn,1,3
if rs.bof and rs.eof then ero"您所填写的文件夹不存在,请更换",1
set r=conn.execute("select count(id) from picgroup where title='"&title&"' and id<>"&id)
if r(0)>0 then ero"新文件夹名称已经存在",1
r.close
conn.execute("update [photo] set PicGroup='"&title&"' where PicGroup='"&rs(0)&"'")
rs(0)=title
rs(1)=viewtype
rs(2)=viewpass
rs.update
rs.close
set rs=nothing
suc"修改文件夹成功","manage.asp"
end sub
sub groupdel
id=Trim(Request("id"))
set r=conn.execute("select title from picgroup where id="&id)
if r.bof and r.eof then
suc"文件夹不存在","manage.asp"
else
conn.execute("delete from [photo] where PicGroup='"&r(0)&"'")
conn.execute("delete from picgroup where id="&id)
suc"删除文件夹成功","manage.asp"
end if
r.close
end sub
sub photoadd
title=Trim(Request.QueryString("Title"))
picgroup=Trim(Request.QueryString("picgroup"))
readme=Trim(Request.QueryString("readme"))
formsize=request.totalbytes
formdata=request.binaryread(formsize)
bncrlf=chrB(13) & chrB(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)'上面总共是取得图片的二进制数据
sql="select title,picgroup,pic,picsize,viewtype,readme from [Photo] order by id desc"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn,3,2
rs.addnew
rs(0)=title
rs(1)=picgroup
rs(2).appendchunk mydata
rs(3)=formsize
set r=conn.execute("select viewtype from [picgroup] where title='"&picgroup&"'")
if not(r.bof and r.eof) then
rs(4)=r(0)
end if
r.close
rs(5)=readme
rs.update
set rs=nothing
ero"上传图片成功","photoadd.asp?group="&picgroup
end sub
sub photoedit
title=Trim(Request.QueryString("Title"))
picgroup=Trim(Request.QueryString("picgroup"))
readme=Trim(Request.QueryString("readme"))
re=Trim(Request.QueryString("re"))
if re="1" then
formsize=request.totalbytes
formdata=request.binaryread(formsize)
bncrlf=chrB(13) & chrB(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)'上面总共是取得图片的二进制数据
end if
sql="select title,picgroup,pic,picsize,viewtype,readme from [Photo] order by id desc"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn,3,2
rs(0)=title
rs(1)=picgroup
if re="1" then
rs(2).appendchunk mydata
rs(3)=formsize
end if
set r=conn.execute("select viewtype from [picgroup] where title='"&picgroup&"'")
if not(r.bof and r.eof) then
rs(4)=r(0)
end if
r.close
rs(5)=readme
rs.update
set rs=nothing
ero"修改图片资料成功","showpic.asp?group="&picgroup
end sub
sub photodel
id=Trim(Request("id"))
group=Trim(Request("group"))
conn.execute("delete from [photo] where id="&id)
ero"删除图片成功","showpic.asp?group="&server.urlencode(group)
r.close
end sub
sub music
id=Trim(Request("id"))
mtitle=Trim(Request("mtitle"))
turl=Trim(Request("turl"))
page=Trim(Request("page"))
mtitle=replace(mtitle,",",",")
turl=replace(turl,",",",")
m=split(mtitle,",")
t=split(turl,",")
if id<>"" then conn.execute("delete from [music] where id in ("&id&")")
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open "select title,turl from [music]",conn,1,3
for i=0 to ubound(m)
m_i=trim(m(i))
t_i=trim(t(i))
if m_i<>"" and t_i<>"" then
rs.addnew
rs(0)=m_i
rs(1)=t_i
rs.update
end if
next
rs.close
set rs=nothing
ero"操作成功","music.asp?page="&page
end sub%>

搜索更多相关主题的帖子: 程序错误 相片 
2007-04-25 16:33
快速回复:[求助]上传相片的时候遇到程序错误,帮助
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016446 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved