> accueil > recherche


Résultats de recherche pour <%response.write ""& Request("SearchText")%>
<% Const fsoForReading = 1 Dim strSearchText strSearchText = Request("SearchText") 'Now, we want to search all of the files Dim objFSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Dim objFolder Set objFolder = objFSO.GetFolder(Server.MapPath("/")) Dim objFile, objTextStream, strFileContents, bolFileFound bolFileFound = False 'set objsub=objFolder.Subfolders for each objfolder in objFolder.Subfolders For Each objFile in objFolder.Files 'If Response.IsClientConnected then Set objTextStream = objFSO.OpenTextFile(objFile.Path,fsoForReading) strFileContents = objTextStream.ReadAll fname=objFile.Name fname=replace(fname,".html","") If InStr(1,strFileContents,strSearchText,1) then Response.Write "

  • " & fname & "
    " bolFileFound = True End If ' End If Next next if Not bolFileFound then Response.Write "Pas de résultats trouvés pour "& "
    "& strSearchText objTextStream.Close Set objTextStream = Nothing Set objFolder = Nothing Set objFSO = Nothing %>