例子:文本搜索
<%
Head = "搜索"
SearchString = Request("SearchString")
count=0
''把当前目录的实际路径转换为虚拟路径
Function UnMapPath( Path )
UnMapPath = Replace(Mid(Path, Len(Server.MapPath("/")) + 1), "\", "/")
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 ''从第一个字符开始检查content里面是否有S
If SearchFile Then''如果有,则提出文件...[ 查看全文 ]