Sub Session_onStart() Referer = Trim(Request.ServerVariables("HTTP_REFERER")) If Referer = "" Then Referer = "None" End If Session("Referer") = Referer End Sub
''从指向URL中分离查询字段。 Function isProduct(pStr) If pStr <> "" And lCase(pStr) <> "none" Then ''向后搜索字段 temp = inStrRev(pStr, "/") ''得到目录分离的位置 tempStr = Right(pStr, temp) ''得到有关数据长度 temp2 = Len(pStr) ''得到查询数据行 pStr = Mid(pStr, temp, temp2) ''设定返回功能的值 isProduct = pStr Else isProduct = "" End If End Function
接着是要确立查找的明确标准。为达到这个目的,建立两个静态空间"指?查找指向数据
Function Finder(byRef prodList, byVal refList) ''模糊查询 refList = lCase(refList) '' 通过指针循环查找匹配字段 For i = 0 To uBound(prodList) - 1 If inStr(refList, lCase(prodList(i, 0))) Then ''找到匹配 tHolder = tHolder ; "Are You looking For " _ ; "" _ ; prodList(i, 0) ; " " End If ''第二次循环 Next ''返回结果 Finder = tHolderEnd Function