⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upshoplogo.asp

📁 . 缓存处理技术
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="../inc/sys_config.asp"-->
<!--#include file="../inc/Function.asp"-->
<!--#include file="../ChkSession.asp"-->
<!--#include file="uploadlogo.asp"-->
<%

Response.Buffer = TRUE
Response.Clear
Dim ByteCount,RequestBin
byteCount = Request.TotalBytes
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")

BuildUploadRequest  RequestBin

Dim ContentType,FilePathName,FileName,Picture
contentType =  UploadRequest.Item("shopimage").Item("ContentType")
filepathname = UploadRequest.Item("shopimage").Item("FileName")
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,""))
picture = UploadRequest.Item("shopimage").Item("Value")
if not (contentType="image/pjpeg" or contentType="image/gif") then
   Response.write"<span style='font-size: 9pt;'>出错了,上传的图片类型只能为 gif/jpeg 格式</span>"
   Response.End
End if





Dim objRst
set objRst = server.createobject("adodb.recordset")
objrst.Open "select shopimage from shops where shopownerid="&Request.Cookies(super_user)("uid"), conn, 1,3

objrst.fields("shopimage").appendchunk picture
objrst.update
objrst.close
set objrst=nothing

Response.write"<script language=javascript>alert('图片上传成功!'); top.location.href='../shopadmin_info.asp';</script>"

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -