婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > 如何做一個(gè)文本搜索?

如何做一個(gè)文本搜索?

熱門標(biāo)簽:400電話是怎么申請(qǐng) 重慶400電話哪里辦理 教育機(jī)構(gòu)地圖標(biāo)注 自適應(yīng)地圖標(biāo)注 武漢如何辦理400電話 遼寧營(yíng)銷智能外呼系統(tǒng)價(jià)格多少 語(yǔ)音電銷機(jī)器人視頻 推銷電話機(jī)器人怎么打電話的 常州智能外呼電銷機(jī)器人如何

%
head = "
搜索"
SearchString = Request("SearchString")
count=0

Function UnMapPath( Path )
    UnMapPath = Replace(Mid(Path, Len(Server.MapPath("/")) + 1), "\", "/")

' 把當(dāng)前目錄的實(shí)際路徑轉(zhuǎn)換為虛擬路徑.
End Function


Function SearchFile( f, s, title )
  Set fo = fs.OpenTextFile(f)
  content = fo.ReadAll

' 把全部文本讀到content.
  fo.Close
  SearchFile = InStr(1, content, S, vbTextCompare) > 0

' 從第一個(gè)字符開始檢查content里面是否有S.
  If SearchFile Then

' 如果有,則提出文件title存入變量.
      pos1 = InStr(1, content, "title>", vbTextCompare)
      pos2 = InStr(1, content, "/title>", vbTextCompare)
      title = ""
      If pos1 > 0 And pos2 > 0 Then

' title標(biāo)記中間的字符.
        title = Mid( content, pos1 + 7, pos2 - pos1 - 7 )
      End If
  End If
End Function

Function FileLink( f, title )
  vPath = UnMapPath( f.Path )

' 獲取路徑.
  If title = "" Then title = f.Name

' 做個(gè)鏈接.
  FileLink = "A HREF="""   vPath """>" title "/A>"
  FileLink = "UL>
·" FileLink "/UL>"
End Function

Sub SearchFolder( fd, s )
  found = False 
  For each f In fd.Files
      pos = InStrRev(f.Path, "." )
      If pos > 0 Then
        ext = Mid(f.Path, pos + 1 )
      Else
        ext = ""
      End If
      If LCase(ext) = "htm" Then

' 顯示擴(kuò)展名字為HTM的文件.
        If SearchFile( f, s, title ) Then
            Response.Write FileLink(f, title)
            count=count+1
            Response.Write cstr(count)
        End If
      End If
  Next

  For each sfd In fd.SubFolders
      SearchFolder sfd, s
  Next
End Sub
%>
html>

head>
meta http-equiv="Content-Type"
content="text/html; charset=gb_2312-80">
meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
title>%=head%>/title>
/head>

body>

h1>
星河影動(dòng)之無(wú)敵文本搜索%=head%>/h1>

hr>

form action="search.asp" method="Get">
    p>
請(qǐng)輸入想要搜索的內(nèi)容: input type="text"
    size="20" name="SearchString" value="%=SearchString%>"> input
    type="submit" value="
搜索"> /p>
/form>
%
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Set fd = fs.GetFolder( Server.MapPath("/") ) 

' 設(shè)置開始搜索的路徑.

If SearchString > "" Then
  Response.Write "H2>
搜索font color=red>" SearchString "/font>結(jié)果如下:/H2>P>"
  SearchFolder fd,SearchString
End If
%>
hr>
/body>/html>

[1]

標(biāo)簽:襄陽(yáng) 朔州 遵義 雞西 柳州 威海 中山 邯鄲

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《如何做一個(gè)文本搜索?》,本文關(guān)鍵詞  如何,做,一個(gè),文本,搜索,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《如何做一個(gè)文本搜索?》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于如何做一個(gè)文本搜索?的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 繁昌县| 青阳县| 阿拉尔市| 鄄城县| 钟山县| 天等县| 资兴市| 泰宁县| 宁蒗| 鸡东县| 咸宁市| 乳山市| 榆中县| 黄山市| 定远县| 栾城县| 元氏县| 高州市| 中西区| 泉州市| 苍溪县| 涟源市| 武威市| 长岛县| 江华| 榆树市| 泽普县| 乌兰浩特市| 柳州市| 阿鲁科尔沁旗| 东明县| 安仁县| 彩票| 芜湖县| 长沙县| 应城市| 惠安县| 夹江县| 贵阳市| 邯郸县| 余江县|