asp伪静态代码
<%
DirName="html\" '静态文件保存的目录,结尾应带"\"
foxrax=Request("foxrax")
if foxrax="" then
FileName=GetStr()&".html"
FileName=replace(FileName,"/","")'替换字符
FileName=replace(FileName,"?","")
FileName=replace(FileName,"\","")
FileName=DirName&FileName
if tesfold(DirName)=false then
createfold(Server.MapPath(".")&"\"&DirName)
end if
if ReportFileStatus(Server.MapPath(".")&"\"&FileName)=true then'文件存在
List=ReadFile(FileName)
else'文件不存在的话
List=getHTTPPage(GetUrl())
WriteFile(FileName)
end if
'Lists=split(List,"!@#$%")
'Response.write Lists(0)
'Response.end
end if
'========================函数区============================
'获取当前页面url
Function GetStr()
On Error Resume Next
Dim strTemps
strTemps = strTemps & Request.ServerVariables("URL")
If Trim(Request.QueryString) <> "" Then
strTemps = strTemps & "?" & Trim(Request.QueryString)
else
strTemps = strTemps
end if
GetStr = strTemps
End Function
'获取缓存页面url
Function GetUrl()
On Error Resume Next
Dim strTemp
If LCase(Request.ServerVariables("HTTPS")) = "off" Then
strTemp = "http://"
Else
strTemp = "https://"
End If
strTemp = strTemp & Request.ServerVariables("SERVER_NAME")
If Request.ServerVariables("SERVER_PORT") <> 80 Then
strTemp = strTemp & ":" & Request.ServerVariables("SERVER_PORT")
end if
strTemp = strTemp & Request.ServerVariables("URL")
If Trim(Request.QueryString) <> "" Then
strTemp = strTemp & "?" & Trim(Request.QueryString) & "&foxrax=foxrax"
else
strTemp = strTemp & "?" &
相关文档:
现在主流的网站开发语言无外乎asp、php、asp.net、jsp等。
网页从开始简单的hmtl到复杂的服务语言,走过了10多个年头,各种技术层出不穷,单个的主流技术也在不断翻新的版本,现在分析下各种语言的区别、优势、劣势、开发注意事项!
......
<html xmlns="http://www.w3.org/1999/xhtml" >
<HEAD>
<title>多文件上传 </title>
<script language="JavaScript">
function addFile()
{
var str = ' <br / ......
<% '--------------------------------------------------------------------------------------------------
Set rs9 = Server.CreateObject("ADODB.RecordSet")
sqlstr="select * from 客户资料库 order by id desc"
rs9.open sqlstr,conn,1,3
%>
<%Set fs = server.CreateObject( ......
'函数名:CodeCookie
'作 用:Cookie防乱码写入时用
'参 数:str ---- 字符串
'返回值:整理后的字符串
'示 例:
'**************************************************
Public Function CodeCookie(str)
If is ......