Die Suchmaschine besteht aus einer HTM -Datei und einer ASP -Datei. Es verwendet hauptsächlich die DateiSystemObject -Komponente, um ihren Zweck zu erreichen. Es hat leistungsstarke Funktionen und kann direkt nach der Änderung der Schnittstelle verwendet werden. Natürlich ist es noch besser, ein wenig von Ihren eigenen Dingen hinzuzufügen.
Searchpage.htm
Diese HTM -Datei wird verwendet, um in der Bedingung zu bestehen
<html>
<kopf>
<title> ASP -Suchmaschinenbeispiel </title>
</Head>
<body>
<Center>
<Formmethode = post action = such.asp>
<Tabelle Bgcolor =#CC6633 Border = 0>
<tr>
<Td rowspan = 3 bgcolor =#cc6633 width = 21 nowrap> </td>
<Td width = 363 nowrap> <font color =#fffff>
<Eingabetyp = Textname = SearchText Size = 22>
<Eingabetyp = CheckBox Name = Fall>
Hochempfindlich </font> </td>
<Td rowspan = 3 width = 10>
<Eingabe type = value = OK>
<p>
<Eingabetyp = Reset Value = Clear>
</Td>
<Td rowspan = 3 bgcolor =#cc6633 width = 28> </td>
</Tr>
<tr>
<Td width = 363 nowrap> <font color =#fffff> Rückgabeergebnis
<Select name = rlength>
<Option Value = 200 Selected> Long Message </Option>
<Option Value = 100> Kurznachricht </Option>
<Option Value = 0> Nur zur Verbindung </Option> zurückgeben
</Select>
<Select name = rresults>
<Optionswert = 10 ausgewählt> 10
<Optionswert = 25> 25
<Optionswert = 50> 50
</Select>
</Font>
</Td>
</Tr>
<tr>
<Td width = 363 nowrap> <font color =#fffff> muss enthalten:
<Eingabetyp = CheckBox Name = IIMage>
Bild
<Eingabetyp = Checkbox name = iZIP>
ZIP -Format
<Eingabetyp = Checkbox Name = Ijavas> JavaScript
</Font>
</Td>
</Tr>
</Table>
</Form>
</Center>
<dl>
<Dd> </dd>
</Dl>
</Body>
</Html>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ASP -Programm, das Ergebnisse anzeigt
Search.asp
<html>
<kopf>
Suchergebnisse für <title> '<%= Request (SearchText)%>' </title>
</Head>
<body>
Suchergebnisse für <b> '<%= Request (SearchText)%>' </b> <br>
<%
Const fSoforreading = 1
Dim Objfile, Objfolker, Objsubfolker, Objtextstream
Dim Bolcase, Bolfilefound, Boltagfound
Dim Strcount, Strdetag, Strext, Strfile, Strcontent, Strroot, Strtext, Strtext, Strtitle, Strtitlel