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)))
%>
相关文档:
<%
'建立文件夹函数
Function CreateFolder(strFolder)'参数为相对路径
'首选判断要建立的文件夹是否已经存在
Dim strTestFolder,objFSO
strTestFolder = Server.Mappath(strFolder)
Set objFSO = CreateObject("Scripting.FileSystemObject")
'检查文件夹是否存在
If not objFSO.FolderExists(strTestF ......
代码如下:
<%@ Page Language="C#" Debug="true" %>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.SqlClient"%>
<Script Language="C#" runat="server">
int Record_Per_Page;//定义每页显示记录数
int nPageCount;//定义总页数
int nRecCount;//定义总 ......
asp文件搜索
<%
'*************Set newsearch=new SearchFile '声明 *************
'*************newsearch.Folder="F:+E:"'传入搜索源*************
'*************newsearch.keyword="汇编" '关键词*************
'*************newsearch.Search &nbs ......