ASP最基本的加解密函数
<%
function decrypt(dcode)
dim texts
dim i
for i=1 to len(dcode)
texts=texts & chr(asc(mid(dcode,i,2))-i)
next
decrypt=texts
end function
function encrypt(ecode)
dim texts
dim i
for i=1 to len(ecode)
texts=texts & chr(asc(mid(ecode,i,2))+i)
next
encrypt = texts
end function
dim str
str = "neok"
Response.Write("加密前:" + str + "<br>")
Response.Write("加密后:" + encrypt(str) + "<br>")
Response.Write("解密:"+ decrypt(encrypt(str)))
%>
相关文档:
如id="a/b/c/asdf.html" 参数为动态
怎么把后面的asdf.html过滤?使id="a/b/c/"?
如果id的格式一定为 "????/????/??????/xxxx.xxx"
即最后所要过滤掉的一定是最后一个"/"之后的内容
可以用如下方法:
<%
URL="a/b/c/asdf.html"
PartOfURL=split(URL,"/") '将字符串以"/"分割
UnNeed=spli ......
'显示"上一页 下一页":链接地址,总数,页数,是否显示总数,是否用下拉列表跳转,单位
Public Function PageControl(iCount,pagecount,page,table_style,font_style,colspan)
'生成上一页下一页链接
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request. ......
以下为引用的内容:
<!--这是一个主页文件-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>幻灯片新闻</title>
</head>
<body>
<!--#Include file="diaoyong.asp"-->
</body>
</html>
& ......
<%
Option Explicit
'数据库结构:
'location
'表1 loaction 所在的市 表
' 字段
' loactionid (主键)
' loactionname 名字
'表2 district 所在的县 表
' 字段
' locationid (主键)
' districtid
'&n ......
asp文件搜索
<%
'*************Set newsearch=new SearchFile '声明 *************
'*************newsearch.Folder="F:+E:"'传入搜索源*************
'*************newsearch.keyword="汇编" '关键词*************
'*************newsearch.Search &nbs ......