易截截图软件、单文件、免安装、纯绿色、仅160KB

我写的一个asp上传组件

  网上流传的种种asp上传类真是太烦琐了,我自己写了一个上传类。这个上传类体积很小,只适用于单文件上传,返回结果是一个json,格式为:{"err":"出错原因","msg":"上传文件的地址"},例如:{"err":"\u6587\u4EF6\u592A\u5927\u4E86\2C\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7200K","msg":""}
或者{"err":"","msg":"uploadfile/201013/7897896786.zip"}
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit
Response.Buffer = True
response.charset = "gb2312"
Const uploadfolder="uploadpic"
Const allowExt="jpg,jpeg,gif,png,rar,doc,zip,xls,pdf,swf,avi,mp3,txt,htm,html"
Function BytestoStr(filestr)
dim skipflag : skipflag = 0
dim varlen,clow,i
dim content : content = ""
if not isnull(filestr) then
varlen = lenb(filestr)
for i=1 to varlen
if skipflag=0 then
clow = midb(filestr,i,1)
if ascb(clow) > 127 then
content = content & chr(ascw(midb(filestr,i+1,1) & clow))
skipflag = 1
else
content = content & chr(ascb(clow))
end if
else
skipflag = 0
end if
next
end if
BytestoStr = content
End Function
Function getFilepath(ext)
dim folderpath,fso,filename
folderpath=server.mappath(uploadfolder)
set fso=server.createobject("Scripting.FileSystemObject")
if Fso.FolderExists(folderpath)=false then fso.CreateFolder(folderpath)
folderpath=folderpath&"\"&replace(replace(date(),"/",""),"-","")
fileinfo=uploadfolder&date()
if Fso.FolderExists(folderpath)=false then fso.CreateFolder(folderpath)
filename=cstr(timer()*100)&"."&ext
getFilepath=folderpath&"\"&filename
fileinfo=fileinfo&"/"&filename
set Fso=nothing
End Function
Function CheckExt(fileinfo)
dim re
set re=new


相关文档:

ASP中ByVal与ByRef的区别

废话不多说,贴代码:
先来看看ByVal传值:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Dim arr(2)
arr(0) = 0
arr(1) = 1
arr(2) = 2
Call sub1(arr)
Sub sub1(ByVal a)
a(0) = 9
a(1) = 8
a(2) = 7
Response.Write("我在sub过程中更改了值:"&a(0)&","&a(1)&","&a(2))
......

asp utf 8 头文件数据库联接池

 <%@Language="VBScript" CodePage="65001"%>
<% option explicit%>
<% on error resume next %>
<% Session.CodePage="65001" %>
<% response.charset="utf-8" %>
<%
dim conn,connstr,sql,rs,rs2,rs3
connstr="dbq=" & server.MapPath("../data091003/data09 ......

asp 文字循环滚动(up)

<div id="storyScroller" style="width:100%;height:140px;line-height:28px;overflow:hidden;">
 <div id="storyScrollMid">
  <ul id="storyScrollUl" style=" list-style-type:circle; list-style-position: outside; margin-left:18px; margin-right:0px">
<li>item01</l ......

asp 图片循环滚动(left)

<div class="scrollImgList1" id="scrollImgList1">
 <div class="LeftBotton" onmousedown="ISL_GoUp_1()" onmouseup="ISL_StopUp_1()" onmouseout="ISL_StopUp_1()"></div>
 <div class="Cont" id="ISL_Cont_1">
  <div class="ScrCont">
   <d ......

去除网页源代码中的网页标签,只留文字部分 asp 函数

<%           
Function RemoveHTML( strText )
     Dim TAGLIST
     TAGLIST = ";!--;!DOCTYPE;A;ACRONYM;ADDRESS;APPLET;AREA;B;BASE;BASEFONT;" &_
         &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号