| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 457 人关注过本帖
标题:谁能解释这段程序?
只看楼主 加入收藏
1f2l3y
Rank: 1
等 级:新手上路
帖 子:36
专家分:0
注 册:2006-6-12
收藏
 问题点数:0 回复次数:3 
谁能解释这段程序?
<% a=Request.TotalBytes if a>0 Then Set c=Createobject("adodb.stream") c.Type=1 c.Open c.Write Request.BinaryRead(a) c.Position=0 d=c.Read e=chrB(13)&chrB(10) f=Instrb(d,e) g=Instrb(f+1,d,e) set h=Createobject("adodb.stream") h.Type=1 h.Open c.Position=f+1 c.Copyto h,g-f-3 h.Position=0 h.type=2 h.CharSet="BIG5" i=h.Readtext h.close j=mid(i,InstrRev(i,"\")+1,g) if instr("jsp/asp/aspx/exe/php/html/htm/...",right(j,len(j)-instr(j,".")))>0 then session("error")="您要上传不允许的文件" response.redirect("error.asp") end if j=replace(date,"-","")&right(j,len(j)-instr(j,".")+1) set fso=server.createobject("scripting.filesystemobject") if fso.FileExists(server.mappath(j)) then i=1 msg=true do while msg m=left(j,instr(j,".")-1)&"("&i&")"&right(j,len(j)-instr(j,".")+1) if not fso.FileExists(server.mappath(m)) then j=m msg=false end if i=i+1 loop end if set fso=nothing k=Instrb(d,e&e)+4 l=Instrb(k+1,d,leftB(d,f-1))-k-2 h.Type=1 h.Open c.Position=k-1 c.CopyTo h,l h.SaveToFile server.mappath(j),2 end if %> 然后有一表单提交上传图片

[此贴子已经被作者于2006-7-5 16:38:30编辑过]

搜索更多相关主题的帖子: Position stream Set 
2006-07-05 16:32
hangxj
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2045
专家分:0
注 册:2006-4-10
收藏
得分:0 
麻烦整理一下你的代码

http://www./
2006-07-05 16:34
1f2l3y
Rank: 1
等 级:新手上路
帖 子:36
专家分:0
注 册:2006-6-12
收藏
得分:0 
怎么整理也是这样,烦死了
2006-07-05 16:35
1f2l3y
Rank: 1
等 级:新手上路
帖 子:36
专家分:0
注 册:2006-6-12
收藏
得分:0 
以上代码是上传图片代码,加上表单<form>即能运行,谁能详细注解呢?!
2006-07-05 16:40
快速回复:谁能解释这段程序?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018911 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved