Asp编辑图片,接上面(ASP批量保存和编辑图片一文)

==============================================修改图片

效果图如下


拆分图片

  set res = conn.execute("select * from sys_gdimg where id="&sid&"")
  if not res.eof then
   pic2=res("img")
if pic2<>"" then
     piclb=split(pic2,",")
end if 

 <%

'显示图片
          for k = 0 to ubound(piclb)-1
          %>
<a><img alt='点击删除该图片' style="cursor:pointer" οnlοad='DownImage(this,90,90);' src='../UploadFiles/<%=piclb(k)%>'></a>

<%next%>

保存图片

'======================================保存图片
dim request2,formPath,formName,intCount,intTemp
set request2=new UpLoadClass
'设置文件允许的附件类型为gif/jpg/rar/zip
request2.FileType="gif/jpg/bmp/jpeg"
'设置服务器文件保存路径
request2.SavePath="../UploadFiles/"
'设置字符集
request2.Charset="gb2312"
'打开对象
request2.Open() 
temp_str=""
intCount=0
for intTemp=1 to Ubound(request2.FileItem)
formName=request2.FileItem(intTemp)
 temp_str=temp_str&formPath&request2.form(formName)&","
if request2.form(formName&"_Err")=0 then intCount=intCount+1
next
temp_str2=temp_str

if temp_str="" then
 img2=pic1
else
 img2=pic1&temp_str2
end if

kid编辑是的参数

str="update table sys_gdimg set img='"&img2&"'  where id="&kid&""

conn.execute(str)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值