asp静态生成,伪静态
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- #include file="../configinc/conndb.asp"-->
<!--#include file="../configinc/function.asp"-->
<%
keys=request.QueryString("keys")
dim objXmlHttp,binFileData,objAdoStream
if request("action")="index" then
call indexhtml()
response.Write "已更新 首页 页面!"&"<br>"
elseif request("action")="message" then
call messagehtml()
response.Write "已更新 在线留言 页面!"&"<br>"
else
'============================列表页开始======================================
ids=""
call lids(keys)
ids=keys&ids
set rsf=server.CreateObject("adodb.recordset")
rsf.open "select id from "&tables&" where lid in("&ids&") order by shijian desc",conn,1,1
do while not rsf.eof
strOut=ReadfromUTF(Server.MapPath("../")&"\asp\show_"&keys&".htm","utf-8")
'读取数据信息
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select site from "&table&" where id="&keys&" ",conn,3,3
left_site=rs1("site")
rs1.close
set rs1=nothing
'没有分类的左边显示
leftxx=""
if shangjis(keys)=99 then
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select id,title from "&tables&" where lid="&keys&" ",conn,3,3
do while not rs1.eof
leftxx=leftxx&left_site
leftxx=Replace(leftxx,"{left_id}",rs1("id"))
leftxx=Replace(leftxx,"{left_title}",rs1("title"))
相关文档:
在网上看到很多这方面的代码,但是有些是不能用,有些是垃圾代码太多,我简单的修改了一下现在与大家共享一下。
<%
Option Explicit
dim databasename '定义数据库名称
databasename="database.mdb" '数据库名称
dim databasepath '定义数据库存放路径
......
asp 中常用的文件处理函数 收藏
asp 中处理文件上传以及删除时常用的自定义函数
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'所有自定义的VBS函数
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function DeleteFile(Filename) '删除文件
&nbs ......
<%
DirName="html\" '静态文件保存的目录,结尾应带"\"
foxrax=Request("foxrax")
if foxrax="" then
FileName=GetStr()&".html"
FileName=replace(FileName,"/","")'替换字符
FileName=replace(FileName,"?","&qu ......
<%@ Language="VBScript" %>
<%' Option Explicit %>
<%
'不使用输出缓冲区,直接将运行结果显示在客户端
Response.Buffer = False
'声明待检测数组
Dim ObjTotest(26,4)
ObjTotest(0,0) = "MSWC.AdRotator"
ObjTotest(1,0) = "MSWC.BrowserType"
ObjTotest(2,0) = ......
'creat by qqlxinye@tom.com
'time 2008-09-19
'qq:273453129
'web www.qqlxinye.cn
dim outSmtp,outUser,outPsd,recUser,recSubmit,bodyContent,AddAttachment,ifsend
function init_mail(str1,str2,str3,str4,str5,str6,str7)
outSmtp=str1
outUser=str2
outPsd=str3
recUser=str ......