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

📄 upfile_gg.asp

📁 创建和运行动态、交互的Web服务器应用程序
💻 ASP
字号:
<!--#include FILE="conn.asp"-->
<!--#include FILE="uploadclass.inc"-->
<%
'//上传图片
dim upload,formPath,formName,file,pic20060112,editname,bookpic,bookid,upictemp,action

set upload=new upload_5xSoft       ''建立上传对象

if upload.form("filepath")="" then ''得到上传目录
   response.write"请输入要上传至的目录!"
   set upload=nothing
   response.end
else
   formPath=upload.form("filepath")&"ggpic01"&"/"
   if right(formPath,1)<>"/" then formPath=formPath&"/" ''在目录后加(/)
end if


set file=upload.file("file1")  ''得到上传文件

if file.FileSize>0 then        ''如果 FileSize > 0 说明有文件数据
   editname=month(now)&day(now)&hour(now)&minute(now)&second(now)&right(file.filename,4)''文件更名
   file.filename=editname
   file.SaveAs Server.mappath(formPath&file.FileName)
end if
 set rs=server.CreateObject("adodb.recordset")
     rs.Open "select * from shop_ggpic ",conn,1,3
     rs.addnew
     rs("ggpicname")=editname
     rs("ggpicposi")="Q"
     rs("picaddate")=date
     rs.update

response.Write "<script language='javascript'>alert('广告图片已上传成功!');window.location.reload('guanggao.asp?action=uppic')</script>"

set rs=nothing      ''删除此数据
set file=nothing    ''删除此文件
set upload=nothing  ''删除此对象
%>

⌨️ 快捷键说明

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