%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%response.CODEPAGE=65001 %>
<%response.Charset="utf-8"%>
<%
dim add_no_value '是否添加值為空白的參數作為文件名,默認是false'
add_no_value = false
dim filepath
asp_file_name = Request.ServerVariables("SCRIPT_NAME")
asp_file_name = replace(asp_file_name,"/","")
filepath = replace(asp_file_name, ".", "_") & "/"
query = trim(lcase(request.queryString)) '原始query字符串取小寫,去除前后空格'
if query = "" Then
filepath = filepath & "index.html"
else
arr = split(query,"&")
for i=0 to ubound(arr)
arr(i) = split(arr(i), "=")(0)
Next
arr_sort = SortPara(arr)
for i=0 to ubound(arr_sort)
value = request.queryString(arr_sort(i))
filepath = filepath & arr_sort(i) & "=" &value
if i <> ubound(arr_sort) Then
filepath = filepath & "&"
else
filepath = filepath & ".html"
end if
next
end if
dst_file = Server.MapPath(filepath)
Set fso=Server.CreateObject("Scripting.FileSystemObject")
If fso.FileExists(dst_file) then
set fso=nothing
ReadTextFile dst_file,"utf-8"
else
set fso=nothing
Response.Status = "404 Not Found"
end if
'列表排序'
Function SortPara(sPara)
Dim nCount
nCount = ubound(sPara)
For i = nCount To 0 Step -1
minmax = sPara( 0 )
minmaxSlot = 0
For j = 1 To i
mark = (sPara( j ) > minmax)
If mark Then
minmax = sPara( j )
minmaxSlot = j
End If
Next
If minmaxSlot <> i Then
temp = sPara( minmaxSlot )
sPara( minmaxSlot ) = sPara( i )
sPara( i ) = temp
End If
Next
SortPara = sPara
end Function
Function ReadTextFile(filePath,CharSet)
dim stm
set stm=Server.CreateObject("adodb.stream")
stm.Mode=3
stm.Open
stm.LoadFromFile filePath
stm.Position=0
stm.Type=2
stm.Charset=CharSet
ReadTextFile = stm.ReadText
stm.Close
set stm=nothing
response.write(ReadTextFile)
End Function
%>
午夜精品久久久久久毛厂了|无码日韩精品一区二区免费暖暖|肥臀AV无码久久|9999久久久久国产红豆