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" onload='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

扫描二维码关注公众号,回复: 4261994 查看本文章

kid编辑是的参数

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

conn.execute(str)

猜你喜欢

转载自blog.csdn.net/xiaoyuehan007/article/details/9249217