易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

vb和asp如何用remote访问远程数据库

访问远程数据库的情况有以下几种:
1)访问远程数据库的access数据库
2)访问远程mssql数据库或oracle等其他关系数据库,但是数据库通信端口被防火墙阻挡或其他网络原因造成无法使用该端口
本文仅在windows2000 advance server,mdac2.8下测试通过,其余条件不保证能正常运行
在mdac的Service Providers中包括Microsoft ......

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编写过程

编写过程
过程是一组能执行指定任务且具有返回值的脚本命令。您可以定义自己的过程,然后在脚本中反复调用它们。
您可以将过程定义放在调用过程的 .asp 文件中,也可以将通用过程放在一个共享的 .asp 文件中,然后用 SSI #include 指令将其包含进其他调用其过程的 .asp 文件中。您还可选择另一种方法,即把这些功能打包 ......

使用ASP发送飞信的免费短信

 使用ASP发送飞信的免费短信
     要实现在asp网站上发送飞信,要求是中国移动的手机用户,并且开通移动飞信功能。
     使用以下asp代码,修改参数为你的手机号及飞信密码,就可以实现在网站发免费短信功能。
    
fsend.asp文件源代码如下:
< ......

ASP错误信息解决方法

1.错误信息
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server 不存在或访问被拒绝
原因:
2005里似乎不支持“(local)”和“点”将其改为服务器的名称。
2000是可以的。所以不会出现这样的问题。
2.错误信息
错误类型一:
Mi ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号