知识大全 asp利用文件上传组件upload
Posted 文件
篇首语:梦想不大, 道路很长,开始了就别停下。本文由小常识网(cha138.com)小编为大家整理,主要介绍了知识大全 asp利用文件上传组件upload相关的知识,希望对你有一定的参考价值。
我们是利用upload文件上传组件进行文件上传哦
<%Server ScriptTimeOut= %> <! #include file="conn asp" > <! #include FILE="upload_ xsoft inc" > <> <head> <title>文件上传</title> <link rel="stylesheet" href="<%=css%>" type=text/css> <meta equiv="Content Type" content="text/; charset=gb "></head> <body> <%dim upload file formName formPath iCount exeec wjm set upload=new upload_ xsoft formPath="FJ/"
ly=upload form("content") yhm=upload form("yhm") zid=upload form("zid") ys=upload form("ys") yyzm = upload form("yzm") zt=upload form("zt") ztid=upload form("ztid") cz=upload form("cz") tp=upload form("tp") if tp = "//" then tp = "" ly=xrzh(ly)
if cz = "" then fhlj = "bbs_list asp?zid="&zid else fhlj = "bbs_tj asp?page=&zt="&zt&"&ztid="&ztid&"&zid="&zid zid = ztid end if
if yyzm <> session(sessionvalue & "yzm") then redirect fhlj
zhhf = jdsj if yhm = "" then yhm = "游客" request servervariables("remote_addr")
for each formName in upload objFile 列出所有上传了的文件 set file = upload file(formName) if file FileSize> then kzm = lcase(right(file filename )) if instr(" mpg asf avi mp swf mpeg png gif bmp jpg wma wmv txt" kzm)<= then response Redirect hflj if file filesize > then%> <script language="javascript"> alert("文件大于 k!"); window location="<%=fhlj%>"; </script> <%end if wjdx = file filesize wjm = formpath&replace(cstr(date) " " "") & cstr(Replace(Timer() " " "")) & kzm file SaveAs Server mappath(wjm) dx = cstr(file filesize/ ) if len(dx) > then dx=left(dx ) end if next if trim(zt) <>"" then sql = "select * from yrwl_tb_lt order by id desc" set rs = server createobject("adodb recordset") rs open sql conn if sjk <> "" then if rs eof then id = " " else id = cstr(rs("id")+ ) end if end if rs addnew if sjk = "" then if rs eof then id = " " else id = cstr(rs("id")) end if end if rs("yhm") = yhm
rs("zt") = zt rs("ly") = ly
if wjm = "" and tp <> "" then wjm = tp rs("fj") = wjm rs("dx") = dx rs("dj") = rs("zd") = " " rs("hf") = if cz = "" then rs("zid") = "s" rs("zhhf") = jdsj & " "&yhm rs("lb") = zid else rs("zid") = zid sql = "select * from yrwl_tb_lt where id=" & zid set rs = server createobject("adodb recordset") rs open sql conn rs ("zhhf") = jdsj & " "&yhm rs update rs close end if
rs("sj") = jdsj rs update rs close
if instr(yhm " ") = and yhm <> "游客" then exec="select * from yrwl_tb_admin where yhm="&yhm&" " rs open exec conn cs = rs("cs") qm = rs("qm") if isnull(cs) then cs = if cs="" then cs= exec="update yrwl_tb_admin set cs=" & cstr( cs + ) & " where yhm=" & yhm & " " conn execute exec end if
if cz = "" then 读文件 if wjm <> "" then kzm = lcase(right(wjm )) if instr(wjm "") = then wjm = " /" & wjm xswjm = gqzh(wjm) if len(wjm)> and instr(wjm "FJ")> then tpxs = xswjm & "<br>附件下载:<a href=" & wjm & " target=_blank>[" & wjm &"]</a>" else tpxs = xswjm end if if tpxs = "" or (instr(wjm "swf")> ) then tpxs = "<iframe id=kj name=kj frameborder=width=% height=src=&wjm&></iframe>" end if set fso = Server Createobject("Scripting FileSystemObject") set file=fso opentextfile(Server mappath("tbtb txt") False) do while file AtEndOfStream<>true wjnr = wjnr & file ReadLine() & chr( ) loop file close set file = nothing set fso = nothing if isnull(qm) then qm = "" ly = replace(ly chr( ) "<br>") wjnr = replace(wjnr "$ti$" zt) wjnr = replace(wjnr "$sj$" jdsj) wjnr = replace(wjnr "$zt$" kill_keyword(zt)) wjnr = replace(wjnr "$ly$" kill_keyword(ly) & "<br>" & tpxs & " <Br> 个性签名 <a title="&qm&">"&qm&"</a>") wjnr = replace(wjnr "$zid$" zid) wjnr = replace(wjnr "$qm$" qm) wjnr = replace(wjnr "$ztid$" id)
if instr(yhm " ")> then yhm=left(yhm instrrev(yhm " "))&"*" wjnr = replace(wjnr "$fyr$" yhm) wjnr = replace(wjnr "$lxfs$" session(sessionvalue & "lxfs")) 写文件 wj = Server mappath( "tb/" & id & " " ) set myfileobject=server CreateObject("Scripting FileSystemObject") set mytextfile=myfileobject CreateTextFile(wj) mytextfile WriteLine wjnr mytextfile close end if
cha138/Article/program/net/201311/14414相关参考
cha138/Article/program/net/201311/14386
Asp.NET大文件上传组件---提取文件内容 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 为
用Delphi6开发ASP上传组件详解 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 文件上传是
利用ASP技术实现文件直接上传功能 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 引言 采
知识大全 Apache FileUpload文件上传组件API解析
ApacheFileUpload文件上传组件API解析 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧
php教程curl模仿ftp<?if(isset($_post[submit])) if(!empty($_files[upload][name]))  
ASP+上传文件语法 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 这里有一个怎样用ASP+上传
在ASP.NET中如何进行文件上传? 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!上传文件的步骤:
ASP.NET中文件上传下载方法集合 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 文件的上传下
ASP文件上传原理分析及实现实例 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 摘要在基于/的应