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

ASP隐藏下载地址

<%
Response.Buffer = true
Response.Clear
dim url
Dim fso,fl,flsize
dim Dname
Dim objStream,ContentType,flName,isre,url1
Dim strFileName
strFileName=replace(replace(Request("file"),"\",""),"/","")  '传参
strFileName="/files/"&strFileName    ' 改成你你文件的存放路径
If strFileName<>"" Then
'******************************下载文件存放的服务端目录
url=Server.MapPath(strFileName)
else
    Response.Write("no found")
    Response.end 
End If
Set fso=Server.CreateObject("Scripting.FileSystemObject")
Set fl=fso.getfile(url)
flsize=fl.size
flName=fl.name
Set fl=Nothing
Set fso=Nothing
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadfromFile url
Select Case lcase(Right(flName, 4))
Case ".asf"
ContentType = "video/x-ms-asf"
Case ".avi"
ContentType = "video/avi"
Case ".doc"
ContentType = "application/msword"
Case ".zip"
ContentType = "application/zip"
Case ".xls"
ContentType = "application/vnd.ms-excel"
Case ".gif"
ContentType = "image/gif"
Case ".jpg", "jpeg"
ContentType = "image/jpeg"
Case ".bmp"
ContentType = "image/bmp"
Case ".ppt"
ContentType = "application/vnd.ms-powerpoint"
Case ".mdb"
ContentType = "application/x-msaccess"
Case ".wav"
ContentType = "audio/wav"
Case ".mp3"
ContentType = "audio/mpeg3"
Case ".mpg", "mpeg"
ContentType = "video/mpeg"
Case ".rtf"
ContentType = "application/rtf"
Case ".htm", "html" ,"htm(1)"
ContentType = "text/html"
Case ".txt"
ContentType = "text/plain"
Case Else
ContentType = "application/octet-stream"
End Select
'  我是用UPload组件上传的,如果重名会产生"(数字)" 后缀,
'  有些主机会阻止下载这类文件,所以这里加一个检查,将Upload组件自动生成的后缀
If InStr(lcase(Right(flName, 1)),")") Then
 flName=mid(flName,1,Len(flName)-3)
End If
Response.AddHeader "Content-Disposition", "attachment; filename=" &


相关文档:

如何配置ASP运行环境

1.如果您的操作系统为Windows 98,请运行 Windows98的安装光盘。在其Add-ons\pws目录下找到pws的安装程序,运行安装即可
2.如果操作系统为 Windows 2000 以上,可以按图4.1.1的方法安装 IIS:
打开【控制面板】,找到 【添加/删除程序】→【添加/删除WINDOWS组件】,
弹出 【Windows 组件向导】 ,选择 【Internet ......

asp连接access数据例子

<%Dim connstrconnstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Stu.mdb")
Set bb = Server.CreateObject("ADODB.Connection")
bb.Open connstr%>
<html>
<head>
<meta http-equiv="content-Language" content="zh-cn" />
<meta http-equiv="Content-Type ......

asp添加数据记录写入,删除,查看实列

<!--#include file="conn.asp"-->
<%
if request.Form("username")="" or request.form("password")="" then
response.Write("<script>alert('您好,不能为空
');location.href='index.html';</script>")
end if
%>
<%
di ......

asp数据库连接总是出错的不完全解决方案

使用Dreamweaver测试连接成功,但是IIS里面运行却总是错误百出,看了下面这篇博文问题才得以解决、、、
一般情况下asp可以正常运行,但只要连接数据库就提示,Microsoft JET Database Engine 错误
'80004005',我的电脑因为用批处理清理文件,所以不能运行了, 只
1.查看数据库连接语句没有发现错误;
2.查看文件夹的权限已 ......

asp网站从ACCESS转SQLSERVER


前几天为制作一个网站,需要从ACCESS转至SQLSERVER,从网站上查看了很多的资料,但觉得没有一个能够全面覆盖要点的,所以我总结一下,顺便
给出一些经验。
   
首先如果一开始就需要制作SQLSERVER的网站,那么最好将你的爱机装上WINDOWS2000或者2003这样的SERVER版,这样的版本是支持
SQLSERVER正式 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号