asp文件下载
<%
If Not IsNull(Request("fileName")) Then r = DownLoadFile(Request("fileName"))
Function DownLoadFile(fileName)
Dim s,fso,f,fLen
fileName = Server.MapPath(fileName)
'create stream
Set s = Server.CreateObject("ADODB.Stream")
s.Open()
s.Type = 1
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If Not fso.FileExists(fileName) Then Response.Write "文件不存在" : Response.End
Set f = fso.GetFile(fileName)
fLen = f.Size
s.LoadfromFile(fileName)
'clear the buffer
Response.Buffer = True
Response.Clear()
Response.AddHeader"Content-Disposition","attachment;filename=" & f.name
Response.AddHeader"Content-Length",fLen
Response.CharSet = "UTF-8"
Response.ContentType = "application/octet-stream"
'output the file to the browser
Response.BinaryWrite s.Read
Response.Flush
s.Close
Set s = Nothing
Set fso = Nothing
End Function
%>
相关文档:
放入conn.asp中(拒绝攻击 万能Asp防注入代码)
放入conn.asp中(拒绝攻击 万能Asp防注入代码)
第一种:
squery=lcase(Request.ServerVariables("QUERY_STRING"))
sURL=lcase(Request.ServerVariables("HTTP_HOST"))
SQL_injdata =":|;|>|<|--|sp_|xp_|\|dir|cmd|^|(|)|+|$|'|copy|format|and|exec| ......
在我开发BS结构程序中,由于经常需要在ORACLE中处理一些容量较大的文本数据,所以经过反复测试终于用ASP成功解
决了大文本数据在ORACLE下存取问题。
一、运行环境:
1、Microsoft Windows 2000 Server + IIS 5.0
2、Oracle8i中文标准版
二、建立数据表:
CREATE TABLE SYSTEM.TEST(
B ......
<input name="total" type="text" value="<%=webcounter%>" size="12" onbeforepaste="clipboarddata.setdata('text',clipboarddata.getdata('text').replace(/[^\d]/g,''))"
onkeydown="subOnKeyDown()"
onkeyup="value=value.replace(/[^\d]/g,'')"/>
使用后 如果输入为非数字 ......
对于Recordset分页时出现负数的现象,相信会有很多人遇到过这个问题,有时百度、GOOGLE也不得其解,现在由我来总结一下。
出现负数,主要和游标类型有关系。(为举例方便,假设已经有一个conn.asp链接数据库的文件并且已经include)现在举一个例子,代码如下:
'===================================================== ......
1、首先下载淘特站内搜索引擎,首先要导入CMS中的数据到搜索引擎索引中,这个工作您可以放到本地来做,索引后,直接将淘特搜索引擎文件夹压缩后上传到您的空间上即可。
2、数据索引说明:
3、首先在本地部署一个asp.net环境,然后安装淘特站内搜索引擎,假如访问地址是:http://localhost。
4、下面输入地址:http://lo ......